Complete the command to log in to Docker Hub.
docker [1]The docker login command is used to authenticate your Docker client to a Docker registry like Docker Hub.
Complete the command to log in to a private Docker registry at example.com.
docker login [1]To log in to a private registry, specify its URL after docker login. Here, example.com is the private registry address.
Fix the error in the command to log in with a username.
docker login -u [1]-u.-u with -p.The -u option expects the username. Here, myusername is the correct value to provide.
Fill both blanks to log in with username and password in one command.
docker login -u [1] -p [2]
The -u flag is for username and -p is for password. Here, myuser and password123 are example credentials.
Fill all three blanks to create a Docker config file with authentication for a registry.
echo '{"auths": {"[1]": {"auth": "[2]"}}}' > [3]
This command writes a JSON config file for Docker authentication. example.com is the registry, dXNlcjpwYXNz is the base64 encoded 'user:pass', and ~/.docker/config.json is the config file path.