Fix 'docker import' to accept urls without explicit http:// scheme

This commit is contained in:
Solomon Hykes 2013-03-22 19:47:32 -07:00
Родитель ab3a57d01b
Коммит 9b5f0fac81
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -374,6 +374,8 @@ func (srv *Server) CmdImport(stdin io.ReadCloser, stdout io.Writer, args ...stri
}
if u.Scheme == "" {
u.Scheme = "http"
u.Host = src
u.Path = ""
}
fmt.Fprintf(stdout, "Downloading from %s\n", u.String())
// Download with curl (pretty progress bar)