-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
docs: update docker login reference #5386
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5386 +/- ##
==========================================
+ Coverage 60.93% 60.94% +0.01%
==========================================
Files 304 304
Lines 21346 21346
==========================================
+ Hits 13007 13010 +3
+ Misses 7409 7407 -2
+ Partials 930 929 -1 |
102be2f
to
f15c492
Compare
docs/reference/commandline/login.md
Outdated
your Docker account without entering your password. For Docker Hub, the `docker | ||
login` command uses a device code flow by default, unless the `--username` flag | ||
is specified. The device code flow is a secure way to sign in. See | ||
[Authenticate to Docker Hub using device code](#authenticate-to-docker-hub-using-device-code). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also disable the interactive flow when run non-interactively (no TTY) (not 100% sure)
Would it make sense to have a heading about non-interactive authentication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we could... @laurazard do we have some special sauce for handling login differently for non-TTY cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, we don't. With --username
, without setting the password we do error out if non-tty:
$ docker login -u bork 0>/dev/null
Error: Cannot perform an interactive login from a non TTY device
But with the device-code flow, we don't:
$ docker login 0>/dev/null
USING WEB BASED LOGIN
To sign in with credentials on the command line, use 'docker login -u <username>'
Your one-time device confirmation code is: <--->
Press ENTER to open your browser or submit your device code here: https://login.docker.com/activate
Waiting for authentication in the browser…
Although in the first case, there's no way for the user to login when non-interactive, but with the device-code flow a user could open the URL and login on another device. Maybe we should though 🤔
f15c492
to
f8674d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for this @dvdksn
Signed-off-by: David Karlsson <[email protected]>
f8674d5
to
dadcb16
Compare
Signed-off-by: David Karlsson <[email protected]>
dadcb16
to
81744d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@dvdksn can you open a cherry-pick as well? |
[27.x backport] docs: update docker login reference #5386
Signed-off-by: David Karlsson [email protected]