11.) Why should you avoid storing secrets in Docker images?
A) It increases image size
B) It slows down container startup
C) Secrets in images can be easily exposed when the image is shared
D) It prevents multi-stage builds
12.) What does the –cap-drop flag do in Docker?
A) Removes unused images from the host
B) Reduces a container’s capabilities
C) Disables logging for a container
D) Limits CPU usage for a container
13.) What is the default user in a Docker container if none is specified?
A) Non-root user
B) Host system user
C) Root user
D) Docker service user
14.) Which of the following tools can help enforce Docker image security policies?
A) Jenkins
B) Kubernetes
C) Docker Compose
D) Docker Content Trust
15.) What is the function of the Docker –privileged flag?
A) Grants a container root access to the host
B) Disables network communication for the container
C) Encrypts container data
D) Sets resource limits for the container
16.) What is the purpose of using multi-stage builds in Docker security?
A) To reduce image size and exclude unnecessary dependencies
B) To improve container startup time
C) To increase the number of layers in the image
D) To automatically deploy containers
17.) Which Docker feature isolates containers at the kernel level?
A) Control groups (cgroups)
B) Overlay network
C) Namespaces
D) Docker Compose
18.) Why should you use minimal base images like alpine?
A) To reduce image build time
B) To minimize the attack surface
C) To ensure compatibility with all applications
D) To avoid multi-stage builds
19.) What is the role of SELinux in Docker security?
A) Manages container networking
B) Encrypts container images
C) Enforces access control policies on containers
D) Scans Dockerfiles for vulnerabilities
Related