0
0
Dockerdevops~10 mins

Why containers matter in Docker - Test Your Understanding

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

Complete the command to list all running Docker containers.

Docker
docker [1]
Drag options to blanks, or click blank then click option'
Abuild
Brun
Cstart
Dps
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'run' instead of 'ps' to list containers
Using 'build' which is for images
2fill in blank
medium

Complete the command to create and start a container from the image named 'nginx'.

Docker
docker [1] nginx
Drag options to blanks, or click blank then click option'
Abuild
Bstop
Crun
Dpull
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'build' which creates images
Using 'pull' which downloads images
3fill in blank
hard

Fix the error in the command to stop a container with ID 'abc123'.

Docker
docker [1] abc123
Drag options to blanks, or click blank then click option'
Astop
Brm
Cstart
Dexec
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' which starts containers
Using 'rm' which removes containers
4fill in blank
hard

Fill both blanks to create a container named 'webserver' from the 'nginx' image and run it in detached mode.

Docker
docker [1] --name [2] -d nginx
Drag options to blanks, or click blank then click option'
Arun
Bbuild
Cwebserver
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'build' instead of 'run'
Using 'start' without creating the container first
5fill in blank
hard

Fill all three blanks to remove a stopped container named 'old_container'.

Docker
docker [1] [2] [3]
Drag options to blanks, or click blank then click option'
Arm
B-f
Cold_container
Dstop
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'stop' instead of 'rm'
Omitting the container name