1DOCKER(1) JUNE 2014 DOCKER(1)
2
3
4
6 docker-login - Log in to a Docker registry.
7
8
9
11 docker login [--help] [-p|--password[=PASSWORD]]
12 [-u|--username[=USERNAME]] [SERVER]
13
14
15
17 Log in to a Docker Registry located on the specified SERVER. You can
18 specify a URL or a hostname for the SERVER value. If you do not specify
19 a SERVER, the command uses the first value in the field 'registries' in
20 the '[registries.search]' table in /etc/containers/registries.conf, and
21 if not specified there, Docker's public registry located at
22 https://registry-1.docker.io/.
23
24
25 To get a username/password for Docker's public registry, create an
26 account on Docker Hub.
27
28
29 docker login requires user to use sudo or be root, except when:
30
31
32 1. connecting to a remote daemon, such as a docker-machine
33 provisioned docker engine.
34
35 2. user is added to the docker group. This will impact the
36 security of your system; the docker group is root
37 equivalent. See Docker Daemon Attack Surface
38 ⟨https://docs.docker.com/engine/articles/security/#docker-
39 daemon-attack-surface⟩ for details.
40
41
42
43 You can log into any public or private repository for which you have
44 credentials. When you log in, the command stores encoded credentials
45 in $HOME/.docker/config.json on Linux or
46 %USERPROFILE%/.docker/config.json on Windows.
47
48
49
51 --help
52 Print usage statement
53
54
55 -p, --password=""
56 Password
57
58
59 -u, --username=""
60 Username
61
62
63
66 # docker login localhost:8080
67
68
69
71 # docker login docker.io
72
73
74
75
77 docker-logout(1) to log out from a Docker registry.
78
79
80
82 April 2014, Originally compiled by William Henry (whenry at redhat dot
83 com) based on docker.com source material and internal work. June 2014,
84 updated by Sven Dowideit ⟨SvenDowideit@home.org.au⟩ April 2015, updated
85 by Mary Anthony for v2 ⟨mary@docker.com⟩ November 2015, updated by
86 Sally O'Malley ⟨somalley@redhat.com⟩ March 2018, updated by Tom Sweeney
87 ⟨tsweeney@redhat.com⟩
88
89
90
91Docker Community Docker User Manuals DOCKER(1)