docker login

Command Name: 

docker login

Description:

Log in to a Docker Registry default is docker hub.

Steps:

  • Signed up for Docker Hub
  • Created your first repository
  • Built a Docker container image on your computer
  • Login to docker registry using your credentials

Syntax:

easywhatis$ docker login --help

Usage: docker login [OPTIONS] [SERVER]

Log in to a Docker registry.
If no server is specified, the default is defined by the daemon.

Options:
  -p, --password string   Password
      --password-stdin    Take the password from stdin
  -u, --username string   Username
easywhatis$

Example:

Step 1: Sign up for Docker Hub


Step 2: Create your first repository


Once you verify your email id it will show you create repository button



Step 3: Download and install Docker Desktop

Download and install Docker Desktop. If on Linux, download Docker Engine – Community.


 

Step 4: Use docker login to login to docker hub from docker desktop

Open the terminal and sign in to Docker Hub on your computer by running docker login.