0
0
Dockerdevops~10 mins

Starting and stopping containers 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 start a Docker container named myapp.

Docker
docker container [1] myapp
Drag options to blanks, or click blank then click option'
Astart
Bstop
Cremove
Dpause
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'stop' instead of 'start' will stop the container instead of starting it.
Using 'remove' deletes the container, not starts it.
2fill in blank
medium

Complete the command to stop a running Docker container named webserver.

Docker
docker container [1] webserver
Drag options to blanks, or click blank then click option'
Arestart
Bexec
Cstop
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'restart' will stop and then start the container again.
Using 'exec' runs a command inside the container but does not stop it.
3fill in blank
hard

Fix the error in the command to start a container with the name 'db'.

Docker
docker container [1] db
Drag options to blanks, or click blank then click option'
Astart
Brun
Ccreate
Dbuild
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'run' tries to create a new container instead of starting an existing one.
Using 'create' only creates a container but does not start it.
4fill in blank
hard

Fill both blanks to stop and then remove a container named testapp.

Docker
docker container [1] testapp && docker container [2] testapp
Drag options to blanks, or click blank then click option'
Astop
Bstart
Crm
Dpause
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to remove a running container without stopping it first causes an error.
Using 'start' instead of 'stop' will not stop the container.
5fill in blank
hard

Fill all three blanks to start a container named app1, then stop it, and finally remove it.

Docker
docker container [1] app1 && docker container [2] app1 && docker container [3] app1
Drag options to blanks, or click blank then click option'
Arestart
Bstop
Crm
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'restart' instead of 'start' at the beginning.
Trying to remove the container before stopping it.