0
0
Dockerdevops~20 mins

Container states (created, running, paused, stopped) in Docker - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Container States Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Identify the container state after creation
You run the command docker create nginx. What is the state of the container immediately after this command?
Acreated
Brunning
Cpaused
Dstopped
Attempts:
2 left
💡 Hint
Creating a container sets it up but does not start it.
💻 Command Output
intermediate
2:00remaining
State of container after running and pausing
You start a container with docker run -d nginx and then pause it with docker pause [container_id]. What is the container's state after pausing?
Arunning
Bcreated
Cstopped
Dpaused
Attempts:
2 left
💡 Hint
Pausing suspends the container's processes temporarily.
Best Practice
advanced
2:00remaining
Choosing the correct command to stop a running container
Which command properly stops a running Docker container and changes its state to 'stopped'?
Adocker stop [container_id]
Bdocker pause [container_id]
Cdocker kill [container_id]
Ddocker rm [container_id]
Attempts:
2 left
💡 Hint
Stopping allows graceful shutdown, killing is forceful.
Troubleshoot
advanced
2:00remaining
Diagnosing why a container is stuck in 'paused' state
You notice a container is stuck in the 'paused' state and does not resume with docker unpause. What is a likely cause?
AThe container was removed while paused
BDocker daemon crashed and did not restore container state
CThe container is in 'created' state, not 'paused'
DThe container was never started
Attempts:
2 left
💡 Hint
Docker daemon manages container states and may lose track after a crash.
🧠 Conceptual
expert
3:00remaining
Understanding container lifecycle transitions
Which sequence correctly represents the lifecycle states of a Docker container from creation to removal?
Acreated → paused → running → stopped → removed
Brunning → created → paused → stopped → removed
Ccreated → running → paused → running → stopped → removed
Dcreated → running → stopped → paused → removed
Attempts:
2 left
💡 Hint
Think about the order in which a container can be paused and resumed.