Skip to content

[0.12 backport] util/resolver: Fix insecure mirrors#4297

Merged
tonistiigi merged 1 commit intomoby:v0.12from
vvoland:fix-mirrors-hostname-0.12
Oct 2, 2023
Merged

[0.12 backport] util/resolver: Fix insecure mirrors#4297
tonistiigi merged 1 commit intomoby:v0.12from
vvoland:fix-mirrors-hostname-0.12

Conversation

@vvoland
Copy link
Copy Markdown
Collaborator

@vvoland vvoland commented Oct 2, 2023

Mirrors in RegistryConfig.Mirrors can be specified using a full URL (schema, trailing slashes) but registries in the input map are keyed by their hostname.

Previous code used the mirror URL as key which resulted in an empty RegistryConfig being passed to the fillInsecureOpts function and didn't set the insecure options.

Use Host part of the parsed registry as a key instead.

(cherry picked from commit ec65557)

Mirrors in `RegistryConfig.Mirrors` can be specified using a full URL
(schema, trailing slashes) but registries in the input map are keyed by
their hostname.

Previous code used the mirror URL as key which resulted in an empty
`RegistryConfig` being passed to the `fillInsecureOpts` function and
didn't set the insecure options.

Use Host part of the parsed registry as a key instead.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit ec65557)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants