0
0
Dockerdevops~20 mins

Docker Hub as image registry - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Docker Hub Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
Docker login command output
What is the expected output after successfully logging into Docker Hub using the command docker login?
Docker
docker login
ACannot connect to the Docker daemon
BError: unauthorized: incorrect username or password
CLogin Succeeded
DUsage: docker login [OPTIONS] SERVER
Attempts:
2 left
💡 Hint
Think about what message confirms a successful login.
🧠 Conceptual
intermediate
1:30remaining
Purpose of Docker Hub repository tags
Why do we use tags in Docker Hub repositories?
ATo identify different versions or variants of the same image
BTo encrypt the Docker images for security
CTo limit the number of downloads per image
DTo automatically update the image on all servers
Attempts:
2 left
💡 Hint
Think about how you keep track of different versions of a file.
🔀 Workflow
advanced
2:00remaining
Correct sequence to push a Docker image to Docker Hub
Arrange the steps in the correct order to push a Docker image named myapp with tag v1 to Docker Hub.
A3,4,1,2
B4,3,1,2
C4,1,3,2
D3,1,4,2
Attempts:
2 left
💡 Hint
You must login before pushing, and tagging happens after building.
Troubleshoot
advanced
1:30remaining
Error when pushing image: denied: requested access to the resource is denied
You get the error denied: requested access to the resource is denied when running docker push username/myapp:v1. What is the most likely cause?
AYour internet connection is down
BThe Docker daemon is not running on your machine
CThe image name contains invalid characters
DYou are not logged in or logged in with a different Docker Hub account
Attempts:
2 left
💡 Hint
Think about permissions and authentication with Docker Hub.
Best Practice
expert
2:00remaining
Recommended practice for managing sensitive data in Docker images pushed to Docker Hub
Which practice is best to avoid exposing sensitive data when pushing Docker images to Docker Hub?
AUse multi-stage builds to exclude secrets from the final image
BInclude secrets in environment variables inside the Dockerfile
CPush images with all configuration files including passwords
DStore secrets in plain text files inside the image
Attempts:
2 left
💡 Hint
Think about how to keep secrets out of the final image.