305-300 practice question 4 of 15

Which of the following mechanisms are used by LXC and Docker to create containers? (Choose three.)

Full set: 121 questions
Answer options
A: Linux Capabilities Correct answer
B: Kernel Namespaces Correct answer
C: Control Groups Correct answer
D: POSIXACLs
E: File System Permissions
Correct Answer:
A. Linux Capabilities; B. Kernel Namespaces; C. Control Groups
Explanation

Linux containers, as implemented by both LXC and Docker, are built upon three core kernel technologies. Kernel Namespaces provide process isolation, ensuring a container's processes have their own view of system resources like PIDs, network stacks, and mount points, separate from the host and other containers. Control Groups (cgroups) manage and limit the system resources (CPU, memory, I/O) that a container can consume, preventing resource exhaustion. Linux Capabilities allow for fine-grained privilege separation, enabling containerized processes to perform specific privileged operations without granting them full root access, thereby enhancing security. These three mechanisms work together to create the isolated and resource-controlled environment that defines a container.

Why Incorrect

D. POSIX ACLs: These are a general-purpose filesystem feature for setting fine-grained permissions, not a fundamental technology used to create the container's isolation boundary itself.
E. File System Permissions: Standard UNIX permissions are a basic security feature applied within a filesystem but do not create the isolated filesystem view (which is done by the mount namespace). ---

References

1. Linux Kernel Documentation, namespaces(7) man page: "A namespace wraps a global system resource in an abstraction that makes it appear to the processes within the namespace that they have their own isolated instance of the global resource. Changes to the global resource are visible to other processes that are members of the namespace, but are invisible to other processes." This document is the canonical source for the isolation feature.

2. Linux Kernel Documentation, cgroups(7) man page: "Control groups, usually referred to as cgroups, are a Linux kernel feature which allow processes to be organized into hierarchical groups whose usage of various types of resources can then be limited and monitored." This describes the resource management pillar of containerization.

3. Docker Documentation, Security Overview: "Docker containers are, by default, quite secure; especially if you run your processes as non-privileged users inside the container. You can add an extra layer of safety by enabling AppArmor, SELinux, GRSEC, or another appropriate hardening system... Docker also makes use of namespaces, control groups (cgroups), and capabilities." This official vendor documentation confirms the use of these three core technologies. (Source: Docker Docs, "Docker security").

4. Red Hat Enterprise Linux Documentation, Chapter 1. Introduction to containers: "At a high level, containers are made possible by using Linux namespaces and control groups (cgroups)... Namespaces provide the isolation needed to run multiple containers on one host... Cgroups are used to limit the resources that a container can use... Linux capabilities divide the power of root into a set of discrete capabilities." (Source: Red Hat Enterprise Linux 8 Documentation, "Building, running, and managing containers", Section 1.1).

Scroll to Top