0
0
Dockerdevops~10 mins

Inspecting container details 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 list all running Docker containers.

Docker
docker [1]
Drag options to blanks, or click blank then click option'
Aps
Bstart
Cimages
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker run' which starts a new container instead of listing.
Using 'docker images' which lists images, not containers.
2fill in blank
medium

Complete the command to show detailed information about a container named 'webapp'.

Docker
docker container [1] webapp
Drag options to blanks, or click blank then click option'
Alogs
Bstart
Cinspect
Drm
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'logs' which shows output logs, not detailed info.
Using 'start' which runs the container instead of inspecting.
3fill in blank
hard

Fix the error in the command to get the IP address of a container named 'db'. Fill the missing option.

Docker
docker inspect --format='{{.NetworkSettings.IPAddress}}' [1]
Drag options to blanks, or click blank then click option'
Adb
B--ip
Cnetwork
Dcontainer
Attempts:
3 left
💡 Hint
Common Mistakes
Using an option like '--ip' instead of the container name.
Using 'network' or 'container' which are not valid here.
4fill in blank
hard

Fill both blanks to create a command that shows the logs of a container named 'api' and follows new output.

Docker
docker logs [1] [2]
Drag options to blanks, or click blank then click option'
A-f
Bapi
C--follow
D-t
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the container name before the option.
Using '-t' which shows timestamps but does not follow logs.
5fill in blank
hard

Fill all three blanks to create a command that inspects a container named 'cache' and formats output to show only its state status.

Docker
docker inspect --format='{{.[1].[2]' [3]
Drag options to blanks, or click blank then click option'
AState
BStatus
Ccache
DConfig
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Config' instead of 'State' for the first blank.
Using 'cache' as a format field instead of container name argument.