0
0
Dockerdevops~10 mins

Container states (created, running, paused, stopped) in Docker - Interactive Code Practice

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

Complete the command to list all containers, including those not running.

Docker
docker ps [1]
Drag options to blanks, or click blank then click option'
A-a
B-l
C-s
D-r
Attempts:
3 left
💡 Hint
Common Mistakes
Using -l shows only the last container.
Using -r is not valid. -s shows sizes but only for running containers.
2fill in blank
medium

Complete the command to pause a running container named 'webapp'.

Docker
docker [1] webapp
Drag options to blanks, or click blank then click option'
Arestart
Bstop
Ckill
Dpause
Attempts:
3 left
💡 Hint
Common Mistakes
Using stop will stop the container, not pause it.
Using kill will forcefully stop the container.
3fill in blank
hard

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

Docker
docker [1] abc123
Drag options to blanks, or click blank then click option'
Astart
Brun
Ccreate
Dexec
Attempts:
3 left
💡 Hint
Common Mistakes
Using run creates a new container instead of starting the existing one.
Using exec runs a command inside a running container.
4fill in blank
hard

Fill both blanks to create a container named 'db' from the image 'mysql' and keep it stopped after creation.

Docker
docker [1] --name [2] mysql
Drag options to blanks, or click blank then click option'
Acreate
Brun
Cdb
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using run starts the container immediately.
Using start or db as commands is incorrect.
5fill in blank
hard

Fill both blanks to unpause a container named 'cache' and then stop it.

Docker
docker [1] cache && docker [2] cache
Drag options to blanks, or click blank then click option'
Aunpause
Bstop
Cpause
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using pause instead of unpause to resume.
Using start instead of unpause for resuming a paused container.