以远程Github为上下文,Docker构建image的示例如下:
- docker build -t myAccount/myImage https://github.com/champagne/docker-myImage.git
- docker build -t myAccount/myImage https://github.com/champagne/docker-myImage.git#mybranch
- docker build -t myAccount/myImage https://github.com/champagne/docker-myImage.git#mytag
- docker build -t myAccount/myImage https://github.com/champagne/docker-myImage.git#commit_SHA1
- docker build -t myAccount/myImage https://github.com/champagne/docker-myImage.git#:mydir
- docker build -t myAccount/myImage https://github.com/champagne/docker-myI