0
0
Dockerdevops~10 mins

Scanning images for vulnerabilities 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 scan a Docker image named myapp for vulnerabilities using docker scan.

Docker
docker scan [1]
Drag options to blanks, or click blank then click option'
Amyapp
Bscan
Clatest
Dmycontainer
Attempts:
3 left
💡 Hint
Common Mistakes
Using a container name instead of an image name.
Using 'latest' without specifying the image.
Typing 'scan' again after 'docker scan'.
2fill in blank
medium

Complete the command to scan the Docker image nginx:1.21 for vulnerabilities.

Docker
docker scan [1]
Drag options to blanks, or click blank then click option'
Anginx:1.21
Bnginx
Cnginx-latest
D1.21
Attempts:
3 left
💡 Hint
Common Mistakes
Scanning just 'nginx' without the version tag.
Using '1.21' alone without the image name.
Using an incorrect tag like 'nginx-latest'.
3fill in blank
hard

Fix the error in the command to scan the image redis:6.2 for vulnerabilities.

Docker
docker scan redis[1]6.2
Drag options to blanks, or click blank then click option'
A-
B.
C/
D:
Attempts:
3 left
💡 Hint
Common Mistakes
Using a dash or slash instead of a colon.
Omitting the separator between name and tag.
4fill in blank
hard

Fill both blanks to create a command that scans the image python:3.10-slim for vulnerabilities.

Docker
docker [1] [2]
Drag options to blanks, or click blank then click option'
Ascan
Bpython:3.10-slim
Cbuild
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'build' or 'run' instead of 'scan'.
Omitting the tag in the image name.
5fill in blank
hard

Fill all three blanks to create a command that scans the image node:18-alpine and outputs the results in JSON format.

Docker
docker [1] [2] --[3]
Drag options to blanks, or click blank then click option'
Ascan
Bnode:18-alpine
Cjson
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'false' for the JSON output flag.
Omitting the --json flag or setting it incorrectly.