Flag is missing from docker-credential-gcr : --include-artifact-registry
Actual behavior
In our CI/CD we use :
/kaniko/docker-credential-gcr configure-docker --include-artifact-registry
Since this morning we get this error :
flag provided but not defined: -include-artifact-registry
Expected behavior Usually we get something like this :
/kaniko/docker-credential-gcr configure-docker --include-artifact-registry
Configuring default registries....
WARNING: A long list of credential helpers may cause delays running 'docker build'.
We recommend passing the registry names via the --registries flag for the specific registries you are using
Adding config for all GCR and AR registries.
/kaniko/.docker/config.json configured to use this credential helper for GCR and AR registries
To Reproduce Steps to reproduce the behavior:
- Pull latest image
- Run
/kaniko/docker-credential-gcr configure-docker --include-artifact-registry
Additional Information
I investigated a bit and it looks like it comes from this commit
The docker-credential-gcr version is set to 2.0.1 and the --include-artifact-registry flag was only added in version 2.0.2.
Triage Notes for the Maintainers
| Description | Yes/No |
|---|---|
| Please check if this a new feature you are proposing |
|
| Please check if the build works in docker but not in kaniko |
|
Please check if this error is seen when you use --cache flag |
|
| Please check if your dockerfile is a multistage dockerfile |
|
@Aiesnow do you want to open a PR to upgrade the version?
Looks like kaniko 1.23 has a newer version and this can be closed
/workspace # docker-credential-gcr version
Google Container Registry Docker credential helper 2.1.22
/workspace # docker-credential-gcr configure-docker --help
configure-docker: configures the Docker client to use docker-credential-gcr
-include-artifact-registry
include all Artifact Registry registries as well as GCR registries
-overwrite
overwrite any previously configured credential store and/or credentials
-registries string
the comma-separated list of registries to configure the cred helper for
However, based on the warning you might want to just add the ones you need
/workspace # docker-credential-gcr configure-docker -include-artifact-registry
Configuring default registries....
WARNING: A long list of credential helpers may cause delays running 'docker build'.
We recommend passing the registry names via the --registries flag for the specific registries you are using
Adding config for all GCR and AR registries.
/kaniko/.docker/config.json configured to use this credential helper for GCR and AR registries
For example,
docker-credential-gcr configure-docker --registries=europe-docker.pkg.dev