300-910 · Question #128
A developer must ensure maximum security during the software development lifecycle. While investigating, the engineer discovers a potentially vulnerable Docker container. Which two methods must be app
The correct answer is B. Secure container registries. D. Run containers as a nonroot user.. To maximize Docker container security, developers should configure the Dockerfile to run containers as a non-root user and ensure that container images are pulled from and pushed to secure container registries.
Question
Exhibit
Options
- ARun containers as a root user.
- BSecure container registries.
- CRestart to clear temp files.
- DRun containers as a nonroot user.
- EAdd a bulk data entry.
How the community answered
(21 responses)- A5% (1)
- B90% (19)
- E5% (1)
Why each option
To maximize Docker container security, developers should configure the Dockerfile to run containers as a non-root user and ensure that container images are pulled from and pushed to secure container registries.
Running containers as a root user is a significant security risk, as it grants elevated privileges that could be exploited by an attacker to gain control over the host system.
Securing container registries is critical because compromised registries can lead to the deployment of malicious or vulnerable images; using secure, authenticated registries prevents unauthorized image tampering and ensures image integrity.
Restarting a container to clear temporary files is general hygiene but not a direct method applied to the Dockerfile to maximize security against potential vulnerabilities.
Running containers as a non-root user is a fundamental security best practice, as it prevents potential privilege escalation to the host system if a malicious actor gains control of the container.
Adding a bulk data entry is an application-specific action related to data population and has no direct relevance to securing a Docker container or Dockerfile configuration.
Concept tested: Docker container security best practices.
Source: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#user
Topics
Community Discussion
No community discussion yet for this question.
