0
0
Jenkinsdevops~10 mins

Installing with Docker in Jenkins - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to pull the official Jenkins Docker image.

Jenkins
docker [1] jenkins/jenkins:lts
Drag options to blanks, or click blank then click option'
Arun
Bstart
Cbuild
Dpull
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'run' instead of 'pull' will try to start a container without the image.
2fill in blank
medium

Complete the command to start a Jenkins container named 'myjenkins' mapping port 8080.

Jenkins
docker run -d --name myjenkins -p [1]:8080 jenkins/jenkins:lts
Drag options to blanks, or click blank then click option'
A80
B9090
C8080
D5000
Attempts:
3 left
💡 Hint
Common Mistakes
Using port 80 will not forward correctly to Jenkins default port.
3fill in blank
hard

Fix the error in the command to run Jenkins with persistent data storage.

Jenkins
docker run -d --name jenkins -p 8080:8080 -v [1]:/var/jenkins_home jenkins/jenkins:lts
Drag options to blanks, or click blank then click option'
A/var/lib/jenkins
B/data/jenkins
C/home/jenkins
D/tmp/jenkins
Attempts:
3 left
💡 Hint
Common Mistakes
Using container paths on the host side causes errors.
4fill in blank
hard

Fill both blanks to run Jenkins with environment variable and restart policy.

Jenkins
docker run -d --name jenkins -p 8080:8080 -e [1]=-Djenkins.install.runSetupWizard=false --restart=[2] jenkins/jenkins:lts
Drag options to blanks, or click blank then click option'
AJAVA_OPTS
Balways
Cno
DJENKINS_OPTS
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'no' restart policy disables auto-restart.
5fill in blank
hard

Fill all three blanks to create a Docker command that runs Jenkins with a volume, environment variable, and restart policy.

Jenkins
docker run -d --name jenkins -p [1]:8080 -v [2]:/var/jenkins_home -e [3]=-Djenkins.install.runSetupWizard=false --restart=always jenkins/jenkins:lts
Drag options to blanks, or click blank then click option'
A8080
B/data/jenkins
CJAVA_OPTS
D9090
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong port or missing volume causes Jenkins to lose data.