Docker interview practice.
Rehearse with explained interview questions. Describe the mechanism, trace an example, and explain a trade-off before revealing the answer.
How to use this session
- Choose a level and session length. Try each prompt before opening the notes.
- Compare your explanation with the source answer and revisit any concept you missed.
- Mark the questions you reviewed. Sign in to save session history; your draft answers stay in this page.
Code is provided for reading and tracing. These sessions do not execute or automatically grade code.
Docker practice
Think first. Reveal second.
Explain your reasoning before opening the notes. A focused session lets you choose your question count; mock rounds follow the original guide.
Loading your question pool…
Preview the Docker question pool
- Image vs container vs Dockerfile?
A Docker image packages a filesystem and configuration for starting an application. A container is an isolated process environment created from an image with a writable layer and runtime settings. A Dockerfile describes how the image is built, making the package reproducible rather than depending on manual server setup.
- What are layers and multi-stage builds?
Docker layers are reusable filesystem changes produced during image creation. Build caching can reuse unchanged earlier work, while multi-stage builds separate compilation tools from the final runtime package. This improves build speed and can reduce production image size and unnecessary software.
- Volumes vs networks vs Compose?
Volumes provide storage independent of a container's disposable writable layer. Container networks define communication paths and service-name resolution, while Compose declares a set of cooperating containers and their configuration. Together they make a local multi-service setup repeatable without placing every service in one container.