github.com/walkingsparrow/docker@v1.4.2-0.20151218153551-b708a2249bfa/man/docker-login.1.md (about)

     1  % DOCKER(1) Docker User Manuals
     2  % Docker Community
     3  % JUNE 2014
     4  # NAME
     5  docker-login - Register or log in to a Docker registry. 
     6  
     7  # SYNOPSIS
     8  **docker login**
     9  [**-e**|**--email**[=*EMAIL*]]
    10  [**--help**]
    11  [**-p**|**--password**[=*PASSWORD*]]
    12  [**-u**|**--username**[=*USERNAME*]]
    13  [SERVER]
    14  
    15  # DESCRIPTION
    16  Register or log in to a Docker Registry located on the specified
    17  `SERVER`.  You can specify a URL or a `hostname` for the `SERVER` value. If you
    18  do not specify a `SERVER`, the command uses Docker's public registry located at
    19  `https://registry-1.docker.io/` by default.  To get a username/password for Docker's public registry, create an account on Docker Hub.
    20  
    21  `docker login` requires user to use `sudo` or be `root`, except when: 
    22  
    23  1.  connecting to  a remote daemon, such as a `docker-machine` provisioned `docker engine`.
    24  2.  user is added to the `docker` group.  This will impact the security of your system; the `docker` group is `root` equivalent.  See [Docker Daemon Attack Surface](https://docs.docker.com/articles/security/#docker-daemon-attack-surface) for details. 
    25  
    26  You can log into any public or private repository for which you have
    27  credentials.  When you log in, the command stores encoded credentials in
    28  `$HOME/.docker/config.json` on Linux or `%USERPROFILE%/.docker/config.json` on Windows.
    29  
    30  > **Note**: When running `sudo docker login` credentials are saved in `/root/.docker/config.json`.
    31  >
    32  
    33  # OPTIONS
    34  **-e**, **--email**=""
    35     Email
    36  
    37  **--help**
    38    Print usage statement
    39  
    40  **-p**, **--password**=""
    41     Password
    42  
    43  **-u**, **--username**=""
    44     Username
    45  
    46  # EXAMPLES
    47  
    48  ## Login to a registry on your localhost
    49  
    50      # docker login localhost:8080
    51  
    52  # See also
    53  **docker-logout(1)** to log out from a Docker registry.
    54  
    55  # HISTORY
    56  April 2014, Originally compiled by William Henry (whenry at redhat dot com)
    57  based on docker.com source material and internal work.
    58  June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
    59  April 2015, updated by Mary Anthony for v2 <mary@docker.com>
    60  November 2015, updated by Sally O'Malley <somalley@redhat.com>