Closed amab8901 closed 1 month ago
Hi @amab8901 👋
It's generally documented on our docs site and docs.rs too
DOCKER_AUTH_CONFIG
allows to set a json content (just like raw content of config.json
), while DOCKER_CONFIG
allows to set path to your custom config file.
Content is like:
{
"auths": { },
"credsStore": "..."
}
I haven't used docker config files before. If my username is user123
and my password is pass123
, should I write the following as a value to DOCKER_AUTH_CONFIG
?
{
"auths": {
"username": "user123",
"password": "pass123"
},
"credsStore": ""
}
Not really, "auths" represents list of registries and their configs.
You can check the one managed by docker (via docker login command). And testcontainers
uses this one by default.
cat ~/.docker/config.json
I don't have username and password stored in docker config, so doing cat ~/.docker/config.json
doesn't reveal to me where I'm supposed to put the username and password in the docker config
Usually Credential Store
is used and username and passwords are not part of config itself, see https://docs.docker.com/reference/cli/docker/login/
Hi!
I read in the docs about DOCKER_AUTH_CONFIG being used for authenticating via Docker. Can u give me examples of how this is used?