Containerization and Docker Fundamentals Questions

Packaging applications into containers: images and layers, Dockerfiles, registries, image optimization and security, container networking and storage, and the container runtime model. Covers how containers differ from virtual machines, image build and management, and the fundamentals that underpin any orchestration platform. The container primitive before orchestration.

EasyTechnical
47 practiced

What is a Docker image layer, and how does Docker's build cache decide whether a layer from a previous build can be reused? Given a project where dependencies rarely change but source code changes often, how would you order your COPY and RUN instructions to maximize cache reuse, and what causes a cache miss?

EasyTechnical
49 practiced

What's the difference between a process being alive inside a container and the application actually being healthy? How would you use a Docker HEALTHCHECK to reflect that distinction rather than just checking that the process hasn't crashed?

HardTechnical
51 practiced

A faulty release tagged prod just got deployed. Walk through how you'd perform an immediate rollback to the previous known-good image using image digests with a Docker Compose stack, and how automation (recording the last-known-good digest, a one-command rollback script) could make this safer and faster next time.

HardTechnical
37 practiced

A latency-sensitive service shows occasional CPU throttling, memory pressure, and noisy-neighbor effects when several containers share a host. How would you tune container runtime settings (cgroups, CPU shares, --cpuset-cpus) and application behavior to improve tail latency and node stability, including how you'd share GPU resources fairly if the workload uses them?

HardTechnical
46 practiced

You inspect a running production container and notice ps aux inside it shows a growing number of <defunct> zombie processes that never clear, even though the main application appears to be working fine. Explain what PID 1 is responsible for inside a container's PID namespace that it wouldn't have to worry about as an ordinary process on a normal host, why an application binary running directly as PID 1 often fails at that responsibility, and what concrete change you'd make to the container's entrypoint to fix it. What would you gain and lose if you instead solved this by running a full init system inside the container, or by having the container share the host's PID namespace?

Unlock Full Question Bank

Get access to all Containerization and Docker Fundamentals interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.