Merge pull request #8468 from laktek/master

Fix URL check in build from Git.
Upstream-commit: 9cc71b459771d0cbac51051410859fd878236920
Component: engine
This commit is contained in:
Jessie Frazelle
2014-10-31 14:43:21 -07:00
4 changed files with 27 additions and 3 deletions

View File

@ -117,7 +117,7 @@ func (cli *DockerCli) CmdBuild(args ...string) error {
root := cmd.Arg(0)
if utils.IsGIT(root) {
remoteURL := cmd.Arg(0)
if !strings.HasPrefix(remoteURL, "git://") && !strings.HasPrefix(remoteURL, "git@") && !utils.IsURL(remoteURL) {
if !utils.ValidGitTransport(remoteURL) {
remoteURL = "https://" + remoteURL
}