From bc46fbbab7752b80303836e28bdb1a5a3c7bf3ef Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Wed, 13 Mar 2013 18:37:00 -0700 Subject: [PATCH 1/2] gofmt Upstream-commit: d6c3d02205742e8772e1a6027ee35c4783c32e05 Component: engine --- components/engine/commands/commands.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/engine/commands/commands.go b/components/engine/commands/commands.go index 665d38411e..53add48387 100644 --- a/components/engine/commands/commands.go +++ b/components/engine/commands/commands.go @@ -12,8 +12,8 @@ import ( "github.com/dotcloud/docker/rcli" "io" "io/ioutil" - "net/url" "net/http" + "net/url" "os" "path" "strconv" @@ -870,11 +870,11 @@ func (srv *Server) CmdRun(stdin io.ReadCloser, stdout io.Writer, args ...string) return err } else if img == nil { // Separate the name:version tag - if strings.Contains(name, ":") { - parts := strings.SplitN(name, ":", 2) - img_name = parts[0] + if strings.Contains(name, ":") { + parts := strings.SplitN(name, ":", 2) + img_name = parts[0] //img_version = parts[1] // Only here for reference - } else { + } else { img_name = name } From bcc512bb2f924e24bfd2ff0bbfa5b11e96ab2e22 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Wed, 13 Mar 2013 18:37:53 -0700 Subject: [PATCH 2/2] Changed image mirror to http://get.docker.io/images Upstream-commit: c78cbbd002c0c69bb7be6bcf791348b776b17975 Component: engine --- components/engine/commands/commands.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/engine/commands/commands.go b/components/engine/commands/commands.go index 53add48387..781fdeafe0 100644 --- a/components/engine/commands/commands.go +++ b/components/engine/commands/commands.go @@ -446,10 +446,9 @@ func (srv *Server) CmdImport(stdin io.ReadCloser, stdout io.Writer, args ...stri if u.Scheme == "" { u.Scheme = "http" } - // FIXME: hardcode a mirror URL that does not depend on a single provider. if u.Host == "" { - u.Host = "s3.amazonaws.com" - u.Path = path.Join("/docker.io/images", u.Path) + u.Host = "get.docker.io" + u.Path = path.Join("/images", u.Path) } fmt.Fprintf(stdout, "Downloading from %s\n", u.String()) // Download with curl (pretty progress bar)