nerdexam
Cisco

300-910 · Question #23

Which two actions help limit the attack surface of your Docker container? (Choose two.)

The correct answer is A. Run only a single service in each container. C. Use version tags for base images and dependencies.. This question asks for two best practices that help reduce the security vulnerabilities and potential attack vectors in Docker containers.

Security

Question

Which two actions help limit the attack surface of your Docker container? (Choose two.)

Options

  • ARun only a single service in each container.
  • BRun all services in a single image.
  • CUse version tags for base images and dependencies.
  • DUse Kali Linux as a base image.
  • EDownload images over HTTPS supporting sites.

How the community answered

(29 responses)
  • A
    90% (26)
  • B
    7% (2)
  • E
    3% (1)

Why each option

This question asks for two best practices that help reduce the security vulnerabilities and potential attack vectors in Docker containers.

ARun only a single service in each container.Correct

Running only a single service per container adheres to the principle of least privilege and 'one concern per container', minimizing the attack surface by reducing unnecessary processes, libraries, and dependencies within the image.

BRun all services in a single image.

Running all services in a single image significantly increases the attack surface by bundling more software and dependencies than necessary, making the container more complex and harder to secure.

CUse version tags for base images and dependencies.Correct

Using version tags for base images and dependencies (e.g., 'ubuntu:20.04' instead of 'ubuntu:latest') ensures deterministic builds and allows specific security vulnerabilities to be tracked and updated, rather than relying on potentially unstable or unpatched 'latest' tags.

DUse Kali Linux as a base image.

Kali Linux is a specialized distribution for penetration testing and forensics, not designed as a minimal or secure base image for production applications, and would vastly increase the attack surface.

EDownload images over HTTPS supporting sites.

Downloading images over HTTPS is a good practice for ensuring image integrity during transmission, but it does not directly limit the attack surface of the container's contents or configuration once the image is built or running.

Concept tested: Docker container security best practices

Source: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/

Topics

#Docker security#Container best practices#Attack surface reduction#Image security

Community Discussion

No community discussion yet for this question.

Full 300-910 Practice