305-300 practice question 8 of 15
What is the purpose of capabilities in the context of container virtualization?
Full set: 121 questionsLinux capabilities divide the extensive power of the root user into distinct, granular units. In the context of container virtualization, this mechanism is fundamental for security and isolation. Container runtimes, by default, drop most capabilities for processes running inside a container. This ensures that even if a process gains root privileges (UID 0) within the container's namespace, it cannot perform privileged operations that could affect the host system or other containers. For example, a container process is typically denied capabilities like CAPSYSADMIN (perform system administration tasks) or CAPSYSMODULE (load kernel modules), thereby preventing it from infringing upon the isolation boundary.
A. This describes the function of seccomp (Secure Computing Mode), which filters system calls, rather than capabilities, which manage process privileges.
B. This is a function of control groups (cgroups) or storage quotas, which are designed to manage and limit resource consumption like disk I/O and space.
C. This describes features of copy-on-write filesystems (e.g., OverlayFS) or kernel memory management like Kernel Same-page Merging (KSM), not process capabilities.
D. This is primarily achieved through user namespaces, which map a range of UIDs on the host to a privileged range inside the container, allowing a non-root user to appear as root within that container.
1. Official Linux Programmer's Manual (man pages): The capabilities(7) man page is the canonical source. It states, "Linux divides the privileges traditionally associated with the superuser into distinct units, known as capabilities... This allows a process to be granted only the specific capabilities it needs for its work." This underpins the principle of least privilege used by containers.
Source: capabilities(7) — Linux manual page. Section: "Capabilities and execution of programs by root".
2. Official Docker Documentation: The documentation for the docker run command explicitly details how capabilities are used for security. It notes, "By default, Docker drops all capabilities except those needed... This prevents the container from having excessive privileges, enhancing security."
Source: Docker Docs, docker run reference, section "Runtime privilege and Linux capabilities".
3. Red Hat Enterprise Linux Documentation: In the guide for "Building, running, and managing containers," Red Hat explains the security layers. It states, "By default, container engines such as Podman or Docker run containers with a limited set of capabilities. This prevents the processes inside the container from doing things that could harm the host."
Source: Red Hat Enterprise Linux 8 Documentation, "Building, running, and managing containers", Chapter 10. "Securing containers", Section 10.3. "Understanding container security".
Keep practicing
Take the free 305-300 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 305-300 practice questions
- Question 1Which of the following devices exist by default in an LXC container? (Choose three.)
- Question 2Which functionality is provided by Vagrant as well as by Docker? (Choose three.)
- Question 3A clone of a previously used virtual machine should be created. All VM specific informati…
- Question 4Which of the following mechanisms are used by LXC and Docker to create containers? (Choos…
- Question 5Which of the following values are valid in the firmware attribute of a element in a libvi…
- Question 6After creating a new Docker network using the following command: docker network create --…
