diff --git a/graph/registry.go b/graph/registry.go index 599a807c55..487b782fe2 100644 --- a/graph/registry.go +++ b/graph/registry.go @@ -17,6 +17,7 @@ import ( "github.com/docker/docker/cliconfig" "github.com/docker/docker/registry" "golang.org/x/net/context" + "strings" ) type dumbCredentialStore struct { @@ -59,7 +60,7 @@ func NewV2Repository(repoInfo *registry.RepositoryInfo, endpoint registry.APIEnd Transport: authTransport, Timeout: 15 * time.Second, } - endpointStr := endpoint.URL + "/v2/" + endpointStr := strings.TrimRight(endpoint.URL, "/") + "/v2/" req, err := http.NewRequest("GET", endpointStr, nil) if err != nil { return nil, err