0
0
Dockerdevops~10 mins

Why debugging 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 code to list all running Docker containers.

Docker
docker [1]
Drag options to blanks, or click blank then click option'
Aps
Bbuild
Cstart
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker run' instead of 'docker ps' to list containers.
2fill in blank
medium

Complete the code to start an interactive shell inside a running container named 'webapp'.

Docker
docker exec -it webapp [1]
Drag options to blanks, or click blank then click option'
Als
B/bin/bash
Cstop
Drm
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ls' which only lists files, not open a shell.
3fill in blank
hard

Fix the error in the command to view logs of a container named 'db'.

Docker
docker logs [1]
Drag options to blanks, or click blank then click option'
Adb
Bdatabase
Clog
Dcontainer
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong container names like 'database' or 'container'.
4fill in blank
hard

Fill both blanks to create a Docker command that shows logs and follows new log entries for container 'api'.

Docker
docker logs [1] [2]
Drag options to blanks, or click blank then click option'
A-f
Bapi
C--tail
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--tail' instead of '-f' to follow logs.
5fill in blank
hard

Fill all three blanks to create a command that builds a Docker image named 'myapp' from the current directory.

Docker
docker [1] -t [2] [3]
Drag options to blanks, or click blank then click option'
Abuild
Bmyapp
C.
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'run' instead of 'build' to create an image.