Challenge - 5 Problems
Private Registry Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Docker command to start a private registry
What is the output of the command when you start a Docker private registry with the following command?
Assume Docker is installed and the command runs successfully.
docker run -d -p 5000:5000 --name registry registry:2Assume Docker is installed and the command runs successfully.
Docker
docker run -d -p 5000:5000 --name registry registry:2
Attempts:
2 left
💡 Hint
Detached mode (-d) returns the container ID if successful.
✗ Incorrect
Running the registry container in detached mode returns the container ID. It does not print a message like 'Registry started'. If the image is missing, Docker pulls it automatically unless there's no access.
❓ Configuration
intermediate2:00remaining
Configuring Docker daemon to trust insecure registry
You want Docker on your client machine to trust a private registry running on
localhost:5000 without TLS. Which configuration snippet should you add to /etc/docker/daemon.json to allow this?Attempts:
2 left
💡 Hint
Docker uses 'insecure-registries' key for this purpose.
✗ Incorrect
The Docker daemon configuration uses the 'insecure-registries' key to list registries that do not use TLS. Other keys like 'trusted-registries' or 'allow-insecure' do not exist.
🔀 Workflow
advanced3:00remaining
Steps to push an image to a private registry
Which sequence of commands correctly pushes a local Docker image named
myapp:latest to a private registry running on localhost:5000?Attempts:
2 left
💡 Hint
You must build the image first, then login, tag, and push.
✗ Incorrect
First build the image locally, then login to the private registry, tag the image with the registry address, and finally push it.
❓ Troubleshoot
advanced2:00remaining
Diagnosing Docker push failure to private registry
You try to push an image to your private registry at
What is the most likely cause?
localhost:5000 but get the error:denied: requested access to the resource is deniedWhat is the most likely cause?
Attempts:
2 left
💡 Hint
Check if the image name includes the registry address.
✗ Incorrect
The error usually means Docker is trying to push to Docker Hub instead of your private registry because the image name lacks the registry prefix like 'localhost:5000/'.
✅ Best Practice
expert3:00remaining
Securing a private Docker registry with TLS
Which of the following is the best practice to secure a private Docker registry running on your server?
Attempts:
2 left
💡 Hint
Using a reverse proxy with valid TLS certificates is a common secure approach.
✗ Incorrect
The best practice is to run the registry behind a reverse proxy (like Nginx) that manages TLS with valid certificates from a trusted CA. Self-signed certs require extra client config and insecure registries are discouraged.