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

@ -5,7 +5,6 @@ import (
"io/ioutil"
"os"
"os/exec"
"strings"
"github.com/docker/docker/daemon"
"github.com/docker/docker/engine"
@ -59,7 +58,7 @@ func (b *BuilderJob) CmdBuild(job *engine.Job) engine.Status {
if remoteURL == "" {
context = ioutil.NopCloser(job.Stdin)
} else if utils.IsGIT(remoteURL) {
if !strings.HasPrefix(remoteURL, "git://") {
if !utils.ValidGitTransport(remoteURL) {
remoteURL = "https://" + remoteURL
}
root, err := ioutil.TempDir("", "docker-build-git")