Docker Advanced Quiz
← Back to Quiz Home
Welcome! 🐳
Challenge yourself with advanced Docker concepts like Swarm, Internals, and Security.
Instructions:
- Select the best answer for each question.
- Your score will be shown at the end.
Docker Swarm is the native clustering mode for Docker, allowing you to manage a cluster of Docker Engines as a single virtual system.
Which feature allows you to optimize image size by copying artifacts from one stage to another?
Multi-stage builds allow you to use intermediate images to build artifacts and copy only what's needed to the final image.
Which namespace is responsible for process isolation in Docker?
The Process ID (PID) namespace isolates the process ID number space, meaning processes in different PID namespaces can have the same PID.
Which Cgroups features does Docker use?
Control Groups (cgroups) are used to limit, account for, and isolate the resource usage (CPU, memory, disk I/O, etc.) of a collection of processes.
What is the command to initialize a Swarm?
docker swarm init initializes a swarm on the current node, making it a manager.
In Docker Swarm, what is a "Service"?
A Service defines the image, commands, and configurations (replicas, ports) that the swarm manager uses to distribute Tasks to nodes.
Which command removes all unused containers, networks, images, and build cache?
docker system prune is a powerful command to clean up unused data. Adding -a removes specific unused images as well.
What is the default isolation request for Windows Server containers?
Windows Server containers default to process isolation. Hyper-V isolation can be requested for higher security.
Which file is used to configure the Docker daemon?
daemon.json (usually in /etc/docker/) is used to configure Daemon settings like logging drivers, insecure registries, etc.
How can you ensure a container restarts automatically if it crashes?
Using --restart on-failure (or always) in docker run ensures the container restarts based on the policy.
Which feature allows you to sign images to ensure integrity?
Docker Content Trust provides the ability to use digital signatures for data sent to and received from remote Docker registries.
What is the ONBUILD instruction in a Dockerfile?
ONBUILD instructions are executed when the image is used as a base for another image.
How do you update a service in Docker Swarm without downtime?
docker service update allows you to update the image, configuration, or scale of a service, often triggering a rolling update.
Which command displays system-wide information?
docker info displays system-wide information regarding the Docker installation.
What is a "manifest list" (or multi-arch image)?
Manifest lists allow a single tag (e.g., postgres:13) to support multiple architectures.
How do you export a container's filesystem as a tar archive?
docker export exports a container’s filesystem. docker save saves an image.
Which command saves one or more images to a tar archive?
docker save saves the image (including all layers and history) to a tar file.
How do you load an image from a tar archive (created by docker save)?
docker load loads an image from a tar archive or STDIN.
Which command creates a new image from a container's changes?
docker commit creates a new image from a container's changes.
What is the purpose of STOPSIGNAL in Dockerfile?
STOPSIGNAL sets the signal (e.g., SIGTERM, SIGKILL) used to stop the container.
Quiz Progress
0 / 0 questions answered
(0%)
0 correct
Quiz Complete!
0%
📚 Study Guides
📬 Weekly DevOps, Cloud & Gen AI quizzes & guides