Docker login/logout Command

Docker login/logout Command

docker login : Login to a Docker image repository, if no image repository address is specified, the default is the official repository Docker Hub

docker logout : Log out of a Docker image repository, if no image repository address is specified, the default is the official repository Docker Hub

Docker login/logout Syntax

docker login [OPTIONS] [SERVER]
docker logout [OPTIONS] [SERVER]

OPTIONS Description.

  • -u :Username for login
  • -p :Password for login

Docker login/logout Example

Login Docker Hub

docker login -u username -p password

Login Docker Hub

docker logout
Like(0)