Challenge - 5 Problems
Docker CI Image Pusher
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
What is the output of this Docker login command in CI?
You run this command in your CI pipeline to authenticate with Docker Hub:
What will be the output if the credentials are correct?
docker login -u $DOCKER_USER -p $DOCKER_PASS
What will be the output if the credentials are correct?
Docker
docker login -u $DOCKER_USER -p $DOCKER_PASSAttempts:
2 left
💡 Hint
Think about what Docker shows when login is successful.
✗ Incorrect
When Docker login succeeds, it prints 'Login Succeeded'. Other messages indicate errors or warnings.
❓ Configuration
intermediate2:00remaining
Which GitHub Actions step correctly pushes a Docker image to Docker Hub?
You want to push a Docker image from GitHub Actions to Docker Hub. Which step configuration will work correctly?
Attempts:
2 left
💡 Hint
Check if the image tag is specified and environment variables match Docker login.
✗ Incorrect
Option A correctly pushes the tagged image and sets environment variables matching Docker Hub credentials.
❓ Troubleshoot
advanced2:00remaining
Why does this CI pipeline fail to push the Docker image?
In your CI pipeline, you run:
The push fails with:
denied: requested access to the resource is denied
What is the most likely cause?
docker build -t myuser/myimage:latest . docker push myuser/myimage:latest
The push fails with:
denied: requested access to the resource is denied
What is the most likely cause?
Attempts:
2 left
💡 Hint
Think about permissions needed to push images to Docker Hub.
✗ Incorrect
The error means the CI cannot authenticate to Docker Hub, so credentials are missing or wrong.
🔀 Workflow
advanced2:30remaining
What is the correct order of steps to push a Docker image in a CI pipeline?
Arrange these steps in the correct order to push a Docker image from a CI pipeline:
Attempts:
2 left
💡 Hint
Think about setting credentials before login, then build, then push.
✗ Incorrect
First set credentials, then login, then build the image, then push it.
✅ Best Practice
expert3:00remaining
Which practice is best to securely push Docker images from CI?
You want to push Docker images from your CI pipeline securely. Which practice is best?
Attempts:
2 left
💡 Hint
Think about security and secret management best practices.
✗ Incorrect
Storing credentials securely as encrypted secrets and using them in docker login is best practice.