bottlerocket-os / bottlerocket-os/bottlerocket
host-ctr: image pulls through private registry mirrors with mirror-specific creds should work
- Dominant language
- Rust
- Stars
- 9.7k
- Forks
- 586
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 11
Description
**Image I'm using:**
Any bottlerocket image supporting `settings.container-registry.mirrors` and `settings.container-registry.credentials`
**What I expected to happen:**
Specifying registry credentials for registry mirrors directly to work with `host-ctr`.
The following set of settings should work:
```
[settings.container-registry.mirrors]
"public.ecr.aws" = ["https://198.18.34.118:443"]
[[settings.container-registry.credentials]]
registry = "198.18.34.118:443"
username = ""
password = ""
```
**What actually happened:**
`host-ctr` doesn't create the authorizer for the image resolver with the specified creds when pulling the image from the registry mirror since the image source is for `public.ecr.aws` even though we're actually auth-ing against and pulling from the registry mirror.
I have to specify registry credentials for the destination registry in order to be able to pull from the registry mirror.
Have to do this instead:
```
[settings.container-registry.mirrors]
"public.ecr.aws" = ["https://198.18.34.118:443"]
[[settings.container-registry.credentials]]
registry = "public.ecr.aws"
username = ""
password = ""
```
Contributor guide
Assessment
This issue has not been assessed yet.