0
0
Jenkinsdevops~20 mins

Installing with Docker in Jenkins - Practice Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Docker Jenkins Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Jenkins Docker Container Startup Output
You run the command to start Jenkins in Docker:

docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts

What output will you see first in the Docker logs indicating Jenkins is ready to use?
Jenkins
docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts
AError: Port 8080 is already in use
BJenkins initialAdminPassword: /var/jenkins_home/secrets/initialAdminPassword
CJenkins is fully up and running
DJenkins initial setup wizard is complete
Attempts:
2 left
💡 Hint
Look for the file path where Jenkins stores the initial admin password.
Configuration
intermediate
2:00remaining
Correct Docker Run Command for Jenkins with Volume
Which Docker command correctly runs Jenkins with persistent data stored on the host at /home/user/jenkins_home?
Adocker run -p 8080:8080 -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts
Bdocker run -p 8080:8080 -v /var/jenkins_home:/home/user/jenkins_home jenkins/jenkins:lts
Cdocker run -p 8080:8080 -v /home/user/jenkins_home:/var/jenkins_home jenkins/jenkins:lts
Ddocker run -p 8080:8080 -v /home/user/jenkins_home jenkins/jenkins:lts
Attempts:
2 left
💡 Hint
Remember the format for Docker volume mapping is host_path:container_path.
Troubleshoot
advanced
2:00remaining
Jenkins Docker Container Fails to Start
You try to start Jenkins with:

docker run -p 8080:8080 jenkins/jenkins:lts

The container exits immediately. What is the most likely cause?
APort 8080 is already in use on the host
BDocker daemon is not running
CJenkins image is missing from local Docker cache
DThe container requires a volume mount for /var/jenkins_home
Attempts:
2 left
💡 Hint
Check if another service is using the port Jenkins needs.
🔀 Workflow
advanced
3:00remaining
Steps to Upgrade Jenkins Docker Container
What is the correct sequence to upgrade Jenkins running in Docker to a newer version without losing data?
A1,2,3,4
B2,3,1,4
C1,3,2,4
D2,1,3,4
Attempts:
2 left
💡 Hint
You must stop the old container before starting a new one with the updated image.
Best Practice
expert
2:30remaining
Secure Jenkins Docker Installation
Which practice best improves security when running Jenkins in Docker?
ADisable Jenkins authentication to simplify access
BExpose Jenkins ports to all network interfaces
CRun Jenkins container as root user for full access
DUse Docker secrets or environment variables for sensitive data
Attempts:
2 left
💡 Hint
Think about how to protect passwords and tokens in Docker.