docker icon indicating copy to clipboard operation
docker copied to clipboard

Suggestion: docker_registry saves auth token for future use

Open cbreden opened this issue 8 years ago • 2 comments

docker_registry seems to only set an auth header for docker commands to be used during the chef run.

Proposing exposing an action (possibly :enable) that would permanently set the auth for future docker commands outside of the chef context. Example:

# cat .docker/config.json
{
        "auths": {
                "https://index.docker.io/v1/": {
                        "auth": "<GENERATED_AUTH_TOKEN_HERE>"
                }
        },
        "HttpHeaders": {
                "User-Agent": "Docker-Client/17.09.0-ce (linux)"
        }
}

Would this be a supported use case for the docker cookbook? That block could likely be managed with the line cookbook as opposed to a template file if other sources are touching config.json.

cbreden avatar Oct 31 '17 20:10 cbreden

I was surprised to learn this is not the default behavior

feld avatar Jun 15 '23 19:06 feld