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.

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?

MediumTechnical
39 practiced

A container is showing unhealthy in production according to its HEALTHCHECK, and it keeps restarting before it ever receives real traffic. Walk through a step-by-step troubleshooting process: what you'd check in the Dockerfile and application startup path, and how you'd replicate the health probe locally to isolate the cause.

EasyTechnical
47 practiced

What role do image registries (Docker Hub, AWS ECR, GCR, Azure ACR) play in the container workflow, and why might an organization run a private registry instead of only using a public one? Cover tagging conventions (semantic versions vs. commit SHAs), and authentication/access control for pushing and pulling in production.

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.

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.