Skip to content

Switch to --password-stdin for authentication in docker::registry #979

Open
@dantel35

Description

@dantel35

Use Case

I want to be able to authenticate to a private registry in a secure and recommended way, i.e. using --password-stdin and using secrets stored in a vault, not in plaintext in my puppet code/hiera.

Describe the Solution You Would Like

In this module, docker login is not done the recommended way, wich is
cat ~/my_password.txt | docker login --username foo --password-stdin
https://docs.docker.com/reference/cli/docker/login/

Switching to this form of authentication would not only be the recommended way to use docker login, but it would allow to use secrets stored in the vault easily.

Also switching to the recommended way would eliminate the warnings docker registries throw at you when not using "--password-stdin".

Describe Alternatives You've Considered

I tried passing the password parameter with a deferred function - the module does not work this way.

Additional Context

Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions