Sample questions
Containers OrchestrationDifficulty 1
What is the fundamental difference between a container and a virtual machine (VM)?
- aContainers share the host's kernel, while VMs run their own separate OS kernel✓
- bContainers take up more disk space than VMs because they include a full OS
- cVMs start faster than containers because the hypervisor process is optimized
- dContainer technology can only work within a single operating system family
Explanation:Containers are isolated processes that share the host kernel, making them much lighter and faster to start than VMs. VMs are heavier and slower to start because each one boots its own kernel (which is why c is wrong); b also contradicts the lightweight nature of containers.
Containers OrchestrationDifficulty 1
How can the relationship between a container image, a layer, and a running container be summarized?
- aA layer is a live memory snapshot of a running container
- bAn image is a single shared, directly writable layer that multiple containers use simultaneously on disk
- cAn image consists of stacked read-only layers; a container is a running instance started from an image✓
- dA container is a build step that permanently modifies the image on disk and automatically pushes the result to the registry
Explanation:An image is made up of stacked read-only layers; a container is a running instance started from that image with a thin writable layer added on top. a is wrong because a layer is a filesystem layer, not a memory snapshot; d is wrong because a container doesn't permanently modify the image, it runs in its own writable layer.
Containers OrchestrationDifficulty 1
What is the core function of a container registry (e.g. Docker Hub, a private registry)?
- aCentrally collecting live logs from running containers
- bVersioning container images with tags, storing them, and distributing them via push/pull✓
- cAutomatically calculating the CPU and memory limits to allocate to containers
- dMonitoring all processes on the host machine and converting them into containers
Explanation:A registry is a repository that versions images with tags, stores them, and enables distribution via push/pull. a is wrong because log collection is the job of observability tools, not the registry; c and d are outside the registry's scope of responsibility.
Containers OrchestrationDifficulty 1
docker run -d --name web nginx:1.25
What does the
-d flag do in this command?
- aStarts the container only in debug mode with extra logs
- bDeduplicates the container image on disk first
- cStarts the container in the same network namespace as the host
- dRuns the container in the background (detached), without blocking the terminal✓
Explanation:-d (detached) starts the container in the background, returning control to the terminal; you need docker logs separately to see its output. a, b, c are not real Docker flag behaviors — plausible-sounding but wrong guesses a junior candidate might make.
Containers OrchestrationDifficulty 1
While a handful of containers on a single server can be managed by hand, why are orchestration tools (like Kubernetes) needed for dozens of services running across multiple nodes?
- aContainer images cannot be built at all without orchestration tools
- bAs the number of services and nodes grows, manually tracking scheduling, self-healing, and scaling stops being practical✓
- cOrchestration is the layer that first makes it possible for containers to run isolated from each other; without it, the container runtime cannot function at all
- dOrchestration tools exist only to generate cost reporting, billing, and capacity planning reports
Explanation:As the number of nodes and services grows, tasks like tracking where each container should run, restarting a crashed container, and scaling under load become unsustainable to do by hand; orchestration automates this. a is wrong because building is a separate step; c is wrong because isolation is already provided by the container runtime, not orchestration.
Containers OrchestrationDifficulty 1
In a Docker container's typical lifecycle — created, running, stopped/exited — which statement is correct?
- aA container in the
stopped state automatically deletes its image from the host disk - bThe
created state means the container's process has already started running in the background and consuming resources - cEven if a container is
stopped (exited), its filesystem and metadata remain on disk until it's actually removed✓ - dA container in the
running state can never be stopped, only removed
Explanation:A container that has been created but not yet started (created), one that is running (running), and one that has stopped (exited) are distinct states; a stopped container keeps its filesystem/metadata on disk until removed with docker rm, and can be restarted with docker start. a and d contradict actual behavior; b mischaracterizes the created state.