È possibile creare un'immagine da un ramo non master su un repository Github?Docker: come creare un'immagine da un ramo non master su repository Github
Ad esempio, ho il repository //github.com/myAccount/docker-myImage
con un ramo development
che vorrei utilizzare per la mia immagine. Purtroppo, il seguente comando sembra solo per permettere edificio dal ramo master
:
docker build -t myAccount/myImage git://github.com/myAccount/docker-myImage
Ecco la relativa documentazione da man docker build
:
Building an image using a URL
This will clone the specified Github repository from the URL and use it as context.
The Dockerfile at the root of the repository is used as Dockerfile. This only works
if the Github repository is a dedicated repository.
docker build github.com/scollier/Fedora-Dockerfiles/tree/master/apache
Note: You can set an arbitrary Git repository via the git:// schema.
Forse c'è un'alternativa, come docker build -t myAccount/myImage git://github.com/myAccount/docker-myImage:development
?
In realtà, questo non funziona. Ad esempio, quando ho eseguito il comando sopra riportato, ho ricevuto l'errore: 'repository 'https://github.com/fedora-cloud/Fedora-Dockerfiles/tree/master/apache/' non trovato' – modulitos