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

What's the difference between an image tag (like v1.2.3 or latest) and a content-addressable digest (sha256:...)? Why would you deploy by digest in production rather than by tag, and what commands would you use to get an image's digest after pushing it and reference that exact digest when pulling or deploying?

HardSystem Design
51 practiced

Design a health-check strategy for a containerized service whose startup can take several minutes and whose dependencies may be temporarily unavailable. How would you configure HEALTHCHECK (start period, interval, retries) and restart policy so deployments are safe without being overly fragile, and what would you still want in logs and metrics on top of the health check itself?

MediumTechnical
37 practiced

Compare three ways to deliver runtime secrets (API keys, database credentials) to a running container: plain environment variables, a mounted secret file, and fetching from an external secrets provider at startup. Discuss the security and operational trade-offs of each.

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.

MediumTechnical
41 practiced

Write an efficient multi-stage Dockerfile for a Node.js application with a package.json build script: use npm ci for reproducible installs, build static assets in one stage, and produce a minimal runtime image in the final stage. Order instructions so dependency installation is cached across builds when only source code changes, and set a sensible HEALTHCHECK and non-root user.

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.