|
1 .TH "DOCKER" "1" " Docker User Manuals" "Docker Community" "JUNE 2014" "" |
|
2 |
|
3 |
|
4 .SH NAME |
|
5 .PP |
|
6 docker\-login \- Register or log in to a Docker registry. |
|
7 |
|
8 |
|
9 .SH SYNOPSIS |
|
10 .PP |
|
11 \fBdocker login\fP |
|
12 [\fB\-e\fP|\fB\-\-email\fP[=\fIEMAIL\fP]] |
|
13 [\fB\-\-help\fP] |
|
14 [\fB\-p\fP|\fB\-\-password\fP[=\fIPASSWORD\fP]] |
|
15 [\fB\-u\fP|\fB\-\-username\fP[=\fIUSERNAME\fP]] |
|
16 [SERVER] |
|
17 |
|
18 |
|
19 .SH DESCRIPTION |
|
20 .PP |
|
21 Register or log in to a Docker Registry located on the specified |
|
22 \fB\fCSERVER\fR. You can specify a URL or a \fB\fChostname\fR for the \fB\fCSERVER\fR value. If you |
|
23 do not specify a \fB\fCSERVER\fR, the command uses Docker's public registry located at |
|
24 \fB\fChttps://registry\-1.docker.io/\fR by default. To get a username/password for Docker's public registry, create an account on Docker Hub. |
|
25 |
|
26 .PP |
|
27 \fB\fCdocker login\fR requires user to use \fB\fCsudo\fR or be \fB\fCroot\fR, except when: |
|
28 .IP \(bu 2 |
|
29 |
|
30 \item connecting to a remote daemon, such as a \fB\fCdocker\-machine\fR provisioned \fB\fCdocker engine\fR. |
|
31 \item user is added to the \fB\fCdocker\fR group. This will impact the security of your system; the \fB\fCdocker\fR group is \fB\fCroot\fR equivalent. See |
|
32 \[la]https://docs.docker.com/articles/security/#docker-daemon-attack-surface\[ra] for details. |
|
33 .PP |
|
34 You can log into any public or private repository for which you have |
|
35 credentials. When you log in, the command stores encoded credentials in |
|
36 \fB\fC$HOME/.docker/config.json\fR on Linux or \fB\fC%USERPROFILE%/.docker/config.json\fR on Windows. |
|
37 |
|
38 .PP |
|
39 .RS |
|
40 |
|
41 .PP |
|
42 \fBNote\fP: When running \fB\fCsudo docker login\fR credentials are saved in \fB\fC/root/.docker/config.json\fR. |
|
43 .RE |
|
44 |
|
45 |
|
46 .SH OPTIONS |
|
47 .PP |
|
48 \fB\-e\fP, \fB\-\-email\fP="" |
|
49 Email |
|
50 |
|
51 .PP |
|
52 \fB\-\-help\fP |
|
53 Print usage statement |
|
54 |
|
55 .PP |
|
56 \fB\-p\fP, \fB\-\-password\fP="" |
|
57 Password |
|
58 |
|
59 .PP |
|
60 \fB\-u\fP, \fB\-\-username\fP="" |
|
61 Username |
|
62 |
|
63 |
|
64 .SH EXAMPLES |
|
65 .SH Login to a registry on your localhost |
|
66 .PP |
|
67 .RS |
|
68 |
|
69 .nf |
|
70 # docker login localhost:8080 |
|
71 |
|
72 .fi |
|
73 .RE |
|
74 |
|
75 |
|
76 .SH See also |
|
77 .PP |
|
78 \fBdocker\-logout(1)\fP to log out from a Docker registry. |
|
79 |
|
80 |
|
81 .SH HISTORY |
|
82 .PP |
|
83 April 2014, Originally compiled by William Henry (whenry at redhat dot com) |
|
84 based on docker.com source material and internal work. |
|
85 June 2014, updated by Sven Dowideit |
|
86 \[la][email protected]\[ra] |
|
87 April 2015, updated by Mary Anthony for v2 |
|
88 \[la][email protected]\[ra] |
|
89 November 2015, updated by Sally O'Malley |
|
90 \[la][email protected]\[ra] |