0
0
Dockerdevops~10 mins

Why interacting with containers matters 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'
Arun
Bstart
Cbuild
Dps
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker run' instead of 'docker ps' to list containers.
2fill in blank
medium

Complete the command to start an existing container named 'webapp'.

Docker
docker [1] webapp
Drag options to blanks, or click blank then click option'
Abuild
Bstop
Cstart
Drm
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker run' which creates a new container instead of starting an existing one.
3fill in blank
hard

Fix the error in the command to open an interactive shell inside a running container named 'db'.

Docker
docker exec -it [1] /bin/bash
Drag options to blanks, or click blank then click option'
Abash
Bdb
Crun
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'bash' or 'run' instead of the container name.
4fill in blank
hard

Fill both blanks to run a new container from the 'nginx' image and map port 8080 on the host to port 80 in the container.

Docker
docker run -d -p [1]:[2] nginx
Drag options to blanks, or click blank then click option'
A8080
B80
C443
D3000
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the ports or using unrelated ports like 443 or 3000.
5fill in blank
hard

Fill all three blanks to create a Docker volume named 'data_vol', mount it to '/data' inside a container, and run the container from the 'busybox' image.

Docker
docker volume [1] data_vol && docker run -v data_vol:[2] [3] busybox
Drag options to blanks, or click blank then click option'
Acreate
B/data
C-it
Drm
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'rm' instead of 'create' to make the volume.
Wrong mount path or missing interactive flag.