Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: docker_registry saves auth token for future use #937

Open
cbreden opened this issue Oct 31, 2017 · 2 comments
Open

Suggestion: docker_registry saves auth token for future use #937

cbreden opened this issue Oct 31, 2017 · 2 comments
Labels
Documentation Improvements or additions to documentation

Comments

@cbreden
Copy link

cbreden commented Oct 31, 2017

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 cbreden changed the title docker_registry Suggestion: docker_registry saves auth token for future use Oct 31, 2017
@feld
Copy link

feld commented Jun 15, 2023

I was surprised to learn this is not the default behavior

@damacus
Copy link
Member

damacus commented Dec 11, 2024

We should probably document this. Given there are many auth methods I'm inclined to say it's an exercise for the reader.

@damacus damacus added the Documentation Improvements or additions to documentation label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants