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.

HardTechnical
46 practiced

You built an image using a multi-stage build, but at runtime the container fails with an ImportError or a missing shared library. Walk through a step-by-step debugging plan (using tools like docker history, an interactive docker run --rm -it, or dive) to find which stage or layer omitted the dependency, and how you'd fix it without bloating the final image back up.

HardTechnical
39 practiced

You're asked to harden a container image that currently runs as root, ships shell utilities, and is built from a large general-purpose base image, exposing an API to untrusted input. Propose a runtime hardening policy: seccomp profiles, dropping Linux capabilities, a read-only root filesystem, rootless containers, and how you'd enforce and audit these at deploy time, while keeping the service actually operable.

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.

EasyTechnical
44 practiced

What's the difference between CMD and ENTRYPOINT in a Dockerfile, and between their shell form and exec form? Give one example where ENTRYPOINT is preferred and one where CMD is preferred, and explain why exec form matters for how the container's main process receives signals like SIGTERM.

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?

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.