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.

MediumTechnical
52 practiced

Design a retention and cleanup policy for a private registry that's accumulated hundreds of tags from experiments, feature branches, and old releases. Balance storage cost against developer convenience, reproducibility, and rollback capability: lifecycle rules (keep latest N per branch pattern), tag immutability, and how you'd schedule garbage collection.

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
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
46 practiced

What's the difference between COPY and ADD in a Dockerfile? Give two concrete examples where ADD's extra behavior (remote URL fetching, auto-extracting local tar archives) matters, and explain why COPY is generally preferred in production Dockerfiles.

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.

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.