diff --git a/cli/registry/client/endpoint.go b/cli/registry/client/endpoint.go index e06bfea50bc5..2446da85a044 100644 --- a/cli/registry/client/endpoint.go +++ b/cli/registry/client/endpoint.go @@ -22,12 +22,7 @@ type repositoryEndpoint struct { // Name returns the repository name func (r repositoryEndpoint) Name() string { - repoName := r.info.Name.Name() - // If endpoint does not support CanonicalName, use the RemoteName instead - if r.endpoint.TrimHostname { - repoName = reference.Path(r.info.Name) - } - return repoName + return reference.Path(r.info.Name) } // BaseURL returns the endpoint url diff --git a/vendor.mod b/vendor.mod index b4b040b88837..6c86f3f841b7 100644 --- a/vendor.mod +++ b/vendor.mod @@ -13,7 +13,7 @@ require ( github.com/distribution/reference v0.6.0 github.com/docker/cli-docs-tool v0.8.0 github.com/docker/distribution v2.8.3+incompatible - github.com/docker/docker v27.0.2-0.20241209110419-5d72419486fe+incompatible // master (v-next) + github.com/docker/docker v27.0.2-0.20241209174241-b249c5ebd214+incompatible // master (v-next) github.com/docker/docker-credential-helpers v0.8.2 github.com/docker/go-connections v0.5.0 github.com/docker/go-units v0.5.0 diff --git a/vendor.sum b/vendor.sum index 729d6e2c4759..a967ce1bbb81 100644 --- a/vendor.sum +++ b/vendor.sum @@ -51,8 +51,8 @@ github.com/docker/cli-docs-tool v0.8.0/go.mod h1:8TQQ3E7mOXoYUs811LiPdUnAhXrcVsB github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v27.0.2-0.20241209110419-5d72419486fe+incompatible h1:d1p7DOid9l/HWswplM9EGvIFy+8KixweVBvqrLxgj3c= -github.com/docker/docker v27.0.2-0.20241209110419-5d72419486fe+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.0.2-0.20241209174241-b249c5ebd214+incompatible h1:n78wXsuD+b4ch68cGrR/SfpXPi4Q9T3jrBGIN5NEAtE= +github.com/docker/docker v27.0.2-0.20241209174241-b249c5ebd214+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0= diff --git a/vendor/github.com/docker/docker/client/utils.go b/vendor/github.com/docker/docker/client/utils.go index db02ca0b9769..0fea7c820689 100644 --- a/vendor/github.com/docker/docker/client/utils.go +++ b/vendor/github.com/docker/docker/client/utils.go @@ -66,7 +66,7 @@ func encodePlatforms(platform ...ocispec.Platform) ([]string, error) { return out, nil } -// encodePlatforms marshals the given platform to JSON format, to +// encodePlatform marshals the given platform to JSON format, to // be used for query-parameters for filtering / selecting platforms. It // is used as a helper for encodePlatforms, func encodePlatform(platform *ocispec.Platform) (string, error) { diff --git a/vendor/github.com/docker/docker/registry/service.go b/vendor/github.com/docker/docker/registry/service.go index 73f422150dc0..672a721ff6d3 100644 --- a/vendor/github.com/docker/docker/registry/service.go +++ b/vendor/github.com/docker/docker/registry/service.go @@ -105,7 +105,7 @@ type APIEndpoint struct { URL *url.URL AllowNondistributableArtifacts bool Official bool - TrimHostname bool + TrimHostname bool // Deprecated: hostname is now trimmed unconditionally for remote names. This field will be removed in the next release. TLSConfig *tls.Config } diff --git a/vendor/github.com/docker/docker/registry/service_v2.go b/vendor/github.com/docker/docker/registry/service_v2.go index 42b1730a257f..cf95ce51d107 100644 --- a/vendor/github.com/docker/docker/registry/service_v2.go +++ b/vendor/github.com/docker/docker/registry/service_v2.go @@ -24,17 +24,15 @@ func (s *Service) lookupV2Endpoints(hostname string) (endpoints []APIEndpoint, e return nil, err } endpoints = append(endpoints, APIEndpoint{ - URL: mirrorURL, - Mirror: true, - TrimHostname: true, - TLSConfig: mirrorTLSConfig, + URL: mirrorURL, + Mirror: true, + TLSConfig: mirrorTLSConfig, }) } endpoints = append(endpoints, APIEndpoint{ - URL: DefaultV2Registry, - Official: true, - TrimHostname: true, - TLSConfig: tlsconfig.ServerDefault(), + URL: DefaultV2Registry, + Official: true, + TLSConfig: tlsconfig.ServerDefault(), AllowNondistributableArtifacts: ana, }) @@ -53,9 +51,9 @@ func (s *Service) lookupV2Endpoints(hostname string) (endpoints []APIEndpoint, e Scheme: "https", Host: hostname, }, + TLSConfig: tlsConfig, + AllowNondistributableArtifacts: ana, - TrimHostname: true, - TLSConfig: tlsConfig, }, } @@ -65,10 +63,10 @@ func (s *Service) lookupV2Endpoints(hostname string) (endpoints []APIEndpoint, e Scheme: "http", Host: hostname, }, - AllowNondistributableArtifacts: ana, - TrimHostname: true, // used to check if supposed to be secure via InsecureSkipVerify TLSConfig: tlsConfig, + + AllowNondistributableArtifacts: ana, }) } diff --git a/vendor/modules.txt b/vendor/modules.txt index c758ce22d1e0..2da024e36863 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -55,7 +55,7 @@ github.com/docker/distribution/registry/client/transport github.com/docker/distribution/registry/storage/cache github.com/docker/distribution/registry/storage/cache/memory github.com/docker/distribution/uuid -# github.com/docker/docker v27.0.2-0.20241209110419-5d72419486fe+incompatible +# github.com/docker/docker v27.0.2-0.20241209174241-b249c5ebd214+incompatible ## explicit github.com/docker/docker/api github.com/docker/docker/api/types