Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete 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'
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'.
✗ Incorrect
The
docker scan command requires the image name to scan. Here, myapp is the image to scan.2fill in blank
mediumComplete 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'
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'.
✗ Incorrect
To scan a specific image version, include the tag after a colon, like
nginx:1.21.3fill in blank
hardFix 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a dash or slash instead of a colon.
Omitting the separator between name and tag.
✗ Incorrect
Docker image tags are specified with a colon, so it should be
redis:6.2.4fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'build' or 'run' instead of 'scan'.
Omitting the tag in the image name.
✗ Incorrect
The command to scan an image is
docker scan python:3.10-slim.5fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'false' for the JSON output flag.
Omitting the --json flag or setting it incorrectly.
✗ Incorrect
The command
docker scan node:18-alpine --json scans the image and outputs JSON results.