Challenge - 5 Problems
Private Registry Pro
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of this Docker login command?
You run the command
docker login myprivateregistry.com -u user123 -p wrongpassword. What will be the output?Docker
docker login myprivateregistry.com -u user123 -p wrongpasswordAttempts:
2 left
💡 Hint
Think about what happens if you provide a wrong password to a private registry login.
✗ Incorrect
If the password is incorrect, Docker will reject the login and show an unauthorized error message.
❓ Configuration
intermediate1:30remaining
Which Docker configuration file stores credentials for private registries?
You want Docker to remember your login credentials for a private registry. Which file does Docker use to store these credentials by default?
Attempts:
2 left
💡 Hint
It's a JSON file in your home directory under .docker folder.
✗ Incorrect
Docker stores authentication tokens and credentials in the config.json file inside the .docker directory in the user's home folder.
❓ Troubleshoot
advanced2:00remaining
Why does 'docker pull' fail with 'unauthorized: authentication required' even after login?
You logged in successfully to a private registry using
docker login. But when you run docker pull myprivateregistry.com/myimage:latest, it fails with unauthorized: authentication required. What is the most likely cause?Attempts:
2 left
💡 Hint
Think about what happens if you try to pull an image that is not available or misspelled.
✗ Incorrect
If the image or tag does not exist or is misspelled, the registry denies access with an authentication error even if login succeeded.
🔀 Workflow
advanced2:30remaining
What is the correct sequence to pull a private image securely?
Arrange the steps in the correct order to pull an image from a private Docker registry securely.
Attempts:
2 left
💡 Hint
You must login before pulling private images.
✗ Incorrect
First login authenticates you, then pull downloads the image, verify it exists locally, then run it.
✅ Best Practice
expert3:00remaining
Which method is the most secure for automating Docker login in CI pipelines?
You want to automate Docker login to a private registry in a CI pipeline without exposing your password in logs or code. Which method is best?
Attempts:
2 left
💡 Hint
Avoid exposing passwords in command arguments or code files.
✗ Incorrect
Using --password-stdin reads the password from standard input, preventing it from appearing in process lists or logs.