To configure docker-credential-helpers
for seamless integration with Docker Engine, you need to use the credsStore
option in the ~/.docker/config.json
file. This option allows you to specify a credential store that Docker will use to store and retrieve authentication information for accessing Docker registries.
The docker-credential-helpers
project on GitHub (https://github.com/docker/docker-credential-helpers) provides a set of credential helpers for different platforms and environments. The available options include:
osxkeychain
for macOSwincred
for Windowssecretservice
for Linux (GNOME Keyring, KWallet, etc.)pass
for Linux (GNU Pass)ecr-login
for Amazon ECRvault
for HashiCorp Vault
To configure the credential store, you need to add the credsStore
option to the config.json
file in your Docker configuration directory (~/.docker/
by default). Here’s an example configuration that uses the secretservice
credential store:
{
"auths": {
"https://index.docker.io/v1/": {}
},
"credsStore": "secretservice"
}
You can also specify multiple credential helpers for different registries using the credHelpers
option. Here’s an example configuration that uses the ecr-login
helper for the my-ecr-registry.region.amazonaws.com
registry:
{
"auths": {
"https://index.docker.io/v1/": {},
"my-ecr-registry.region.amazonaws.com": {}
},
"credHelpers": {
"my-ecr-registry.region.amazonaws.com": "ecr-login"
},
"credsStore": "secretservice"
}
To install the docker-credential-helpers
on your system, you can follow the instructions in the project’s GitHub repository (https://github.com/docker/docker-credential-helpers#installation).
Sources:
- Docker Desktop release notes: https://docs.docker.com/desktop/release-notes
- Drivers: Docker | Nomad | HashiCorp Developer: https://developer.hashicorp.com/nomad/docs/drivers/docker
- Configuration | Prometheus: https://prometheus.io/docs/operating/configuration
- docker login | Docker Docs: https://docs.docker.com/engine/reference/commandline/login
- Use the Docker command line | Docker Docs: https://docs.docker.com/engine/reference/commandline/cli
- Open Policy Agent | Docker: https://www.openpolicyagent.org/docs/latest/docker-authorization
- Authenticate with the Container Registry | GitLab: https://docs.gitlab.com/ee/user/packages/container_registry/authenticate_with_container_registry.html