With --registry-map=="index.docker.io=europe-west1-docker.pkg.dev/my-registry/docker-hub", when we try to pull the image eclipse-temurin:21.0.2_13-jre, as expected we get:
INFO Retrieving image manifest eclipse-temurin:21.0.2_13-jre
INFO Retrieving image my-registry/docker-hub/eclipse-temurin:21.0.2_13-jre from mapped registry europe-west1-docker.pkg.dev
However with the same --registry-map option, when we try to pull the image caddy/caddy:2.7.6-alpine, we get:
INFO Retrieving image manifest caddy/caddy:2.7.6-alpine
INFO Retrieving image caddy/caddy:2.7.6-alpine from mapped registry europe-west1-docker.pkg.dev
WARN Failed to retrieve image caddy/caddy:2.7.6-alpine from remapped registry europe-west1-docker.pkg.dev: unable to complete operation after 0 attempts, last error: GET https://europe-west1-docker.pkg.dev/v2/token?scope=repository%3Acaddy%2Fcaddy%3Apull&service=: DENIED: Permission "artifactregistry.repositories.downloadArtifacts" denied on resource "projects/caddy/locations/europe-west1/repositories/caddy" (or it may not exist). Will try with the next registry, or fallback to the original registry.
Description
For each registry mapping, represent it by a new instance of Repository and create a new Reference containing it.
Improve registry mapping parser
Add more unit tests to cover more use cases
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
With
--registry-map=="index.docker.io=europe-west1-docker.pkg.dev/my-registry/docker-hub"
, when we try to pull the imageeclipse-temurin:21.0.2_13-jre
, as expected we get:However with the same
--registry-map
option, when we try to pull the imagecaddy/caddy:2.7.6-alpine
, we get:Description
Repository
and create a newReference
containing it.Submitter Checklist
These are the criteria that every PR should meet, please check them off as you review them:
See the contribution guide for more details.
Reviewer Notes
Release Notes
Describe any changes here so maintainer can include it in the release notes, or delete this block.