docker login authenticates the Docker client with Docker Hub so you can push images to your account or organizations you can access. Docker Hub is the default registry, so no domain name is required. The command prompts for your Docker Hub password without displaying it. section 5.2
# using PowerShell $dockerId='<your-docker-id-goes-here>' # using Bash on Linux or Mac export dockerId='<your-docker-id-goes-here>'
Set your Docker Hub username in a shell variable before logging in; PowerShell and Bash use different assignment syntax. section 5.2
echo $dockerId docker login --username $dockerId
Check the username, then authenticate with Docker Hub using the stored Docker ID rather than an email address. section 5.2
Authenticate before pushing
After logging in, tag an existing image with your account name, such as $dockerId/image-gallery:v1, then push that reference to Docker Hub. section 5.2


