Skip to content

cli/registry: support password dash stdin#7029

Open
agirault wants to merge 1 commit into
docker:masterfrom
agirault:login-password-dash-stdin
Open

cli/registry: support password dash stdin#7029
agirault wants to merge 1 commit into
docker:masterfrom
agirault:login-password-dash-stdin

Conversation

@agirault
Copy link
Copy Markdown

@agirault agirault commented Jun 4, 2026

What

Support for docker login --password - and docker login -p - to read the password or PAT from stdin, matching the existing --password-stdin behavior, and following the common CLI convention that - means stdin.

The tradeoff is that - can no longer be used as a literal password value through --password.

Validation

make -f docker.Makefile test-unit

&

docker run --rm -v "$PWD":/src -w /src golang:1.25 ./scripts/with-go-mod.sh go test -mod=mod ./cli/command/registry -run 'TestRunLogin/password_dash|TestLoginHelpDocumentsPasswordDash|TestLoginValidateFlags/(password_dash|short_password_dash|password_stdin_and_password_dash|conflicting_options)'

Note

  • I searched for prior Docker CLI issues and PRs rejecting this behavior and did not find one.
  • Figured an issue was not needed for this and that it could be discussed in an MR instead given the low cost to just write it.
  • No strong feelings if rejected.

Signed-off-by: Alexis Girault <agirault@nvidia.com>
@agirault agirault requested review from a team and thaJeztah as code owners June 4, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant