Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to see detailed info about a Docker container named 'webapp'.
Docker
docker [1] webapp Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker run' instead of 'docker inspect'.
Using 'docker ps' which lists containers but doesn't show details.
✗ Incorrect
The docker inspect command shows detailed information about a container.
2fill in blank
mediumComplete the command to inspect a Docker image named 'nginx'.
Docker
docker [1] nginx Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker pull' which downloads images but doesn't show details.
Using 'docker build' which creates images but doesn't inspect.
✗ Incorrect
docker inspect works for images too, showing detailed info.
3fill in blank
hardFix the error in the command to inspect a container with ID 'abc123'.
Docker
docker inspect [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Adding dashes before the container ID.
Using incomplete or modified container IDs.
✗ Incorrect
The container ID should be given directly without dashes or extra characters.
4fill in blank
hardFill both blanks to inspect only the IP address of a container named 'db'.
Docker
docker inspect --format='{{.[1].[2]' db
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Ports' or 'Gateway' instead of 'NetworkSettings' or 'IPAddress'.
Mixing the order of keys.
✗ Incorrect
The IP address is under NetworkSettings.IPAddress in the inspect output.
5fill in blank
hardFill all three blanks to inspect the mount point source path of a container named 'app'.
Docker
docker inspect --format='{{range .Mounts}}{{if eq .[1] "[2]"}}{{.[3]{{end}}{{end}}' app
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Type' instead of 'Destination' or 'Source'.
Mixing the order of keys or values.
✗ Incorrect
This command finds the mount where Destination equals /data and prints its Source path.