diff options
author | Paweł Gronowski <pawel.gronowski@docker.com> | 2023-05-11 14:08:14 +0200 |
---|---|---|
committer | Paweł Gronowski <pawel.gronowski@docker.com> | 2023-05-11 14:17:57 +0200 |
commit | 2ad499f93e4b5117246ceffb8deb2bd6d9966fd2 (patch) | |
tree | b292493138bba18bad7b9d46300bebc09f901ace | |
parent | e58c267d66cd9c8fc89c582047b22158c9d44db8 (diff) | |
download | docker-2ad499f93e4b5117246ceffb8deb2bd6d9966fd2.tar.gz |
c8d/authorizer: Default to docker.io
When the `ServerAddress` in the `AuthConfig` provided by the client is
empty, default to the default registry (registry-1.docker.io).
This makes the behaviour the same as with the containerd image store
integration disabled.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
-rw-r--r-- | daemon/containerd/resolver.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/containerd/resolver.go b/daemon/containerd/resolver.go index 07c9ed9f0c..9dcfb2a97c 100644 --- a/daemon/containerd/resolver.go +++ b/daemon/containerd/resolver.go @@ -51,7 +51,7 @@ func hostsWrapper(hostsFn docker.RegistryHosts, authConfig *registrytypes.AuthCo func authorizationCredsFromAuthConfig(authConfig registrytypes.AuthConfig) docker.AuthorizerOpt { cfgHost := registry.ConvertToHostname(authConfig.ServerAddress) - if cfgHost == registry.IndexHostname { + if cfgHost == "" || cfgHost == registry.IndexHostname { cfgHost = registry.DefaultRegistryHost } |