0
0
Dockerdevops~5 mins

Starting and stopping containers in Docker - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What command starts a Docker container that is already created but stopped?
Use docker start <container_name_or_id> to start a stopped container.
Click to reveal answer
beginner
How do you stop a running Docker container?
Use docker stop <container_name_or_id> to stop a running container gracefully.
Click to reveal answer
intermediate
What is the difference between docker stop and docker kill?
docker stop sends a signal to stop the container gracefully, allowing cleanup. docker kill forces the container to stop immediately.
Click to reveal answer
beginner
How can you start a container and attach to its output in one command?
Use docker run to start a new container and attach to its output immediately.
Click to reveal answer
beginner
What command lists all running containers?
Use docker ps to see all running containers.
Click to reveal answer
Which command starts a stopped Docker container?
Adocker stop container_name
Bdocker start container_name
Cdocker run container_name
Ddocker kill container_name
What does docker stop do?
AForces immediate container shutdown
BLists all containers
CGracefully stops a running container
DStarts a new container
How do you see all running containers?
Adocker show
Bdocker ls
Cdocker list
Ddocker ps
Which command starts a new container and attaches to it immediately?
Adocker run
Bdocker start
Cdocker attach
Ddocker exec
What is the effect of docker kill?
AForces immediate stop of a container
BGracefully stops a container
CStarts a container
DRemoves a container
Explain how to start and stop Docker containers using commands.
Think about commands to resume stopped containers and to stop running ones.
You got /4 concepts.
    Describe the difference between docker stop and docker kill.
    Consider how the container is stopped and if it has time to clean up.
    You got /4 concepts.