• login
  • logout

    login

    • 用法
    1. Usage: docker login [OPTIONS] [SERVER]
    2. Register or log in to a Docker registry server, if no server is
    3. specified "https://index.docker.io/v1/" is the default.
    4. -e, --email= Email
    5. --help=false Print usage
    6. -p, --password= Password
    7. -u, --username= Username
    • 例子
    1. root@liugang:~# docker login
    2. Username: username
    3. Password: ****
    4. Email: user@domain.com
    5. Login Succeeded

    如果你有一个自己的仓库,你也可以连接到指定主机:

    1. $ sudo docker login localhost:8080

    logout

    • 用法
    1. Usage: docker logout [OPTIONS] [SERVER]
    2. Log out from a Docker registry, if no server is
    3. specified "https://index.docker.io/v1/" is the default.
    4. --help=false Print usage
    • 例子
    1. $ sudo docker logout localhost:8080