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

Compare strategies for managing Python dependencies inside a container: conda environments versus pip with virtualenv or Poetry, including how you'd handle compiled dependencies like CUDA wheels or custom native extensions. How do you keep dependency resolution reproducible and upgrades safe across CI runs?

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.

HardTechnical
50 practiced

CI Docker builds are being killed with out-of-memory errors while compiling native modules. What mitigation strategies would you consider (runner memory/swap, build parallelism, splitting into smaller build stages, pulling prebuilt artifacts instead of compiling), and what are the trade-offs of each?

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
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.

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.