InterviewStack.io LogoInterviewStack.io

Containerization and Docker Fundamentals Questions

Packaging applications into containers: images and layers, Dockerfiles, registries, image optimization and security, 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
37 practiced

Explain the difference between containers and virtual machines (VMs) in the context of production cloud deployments. In your answer, cover kernel sharing, resource isolation (namespaces/cgroups), startup time, density, image/OS size, operational consequences (monitoring/metrics/backup), and give two example workloads where you would prefer VMs over containers and vice versa.

EasyTechnical
52 practiced

Compare 'alpine', 'distroless', and 'scratch' base images. For each, explain pros and cons regarding image size, debugging experience, compatibility with dynamic languages, and musl vs glibc issues. Give one real-world example when you'd choose each base image for production.

HardTechnical
49 practiced

CI distributed build runners are experiencing frequent Docker layer cache misses, causing full rebuilds. Describe a methodical approach to diagnose why caches are ineffective (differences in build context, base image drift, cache not exported/imported) and propose fixes to restore cache reuse across runners.

EasyTechnical
51 practiced

Why should container processes run as non-root in production? Describe Dockerfile techniques to create a non-root user and switch to it (e.g., RUN groupadd, useradd, USER), and explain approaches to allow required privileged operations (for example binding to ports <1024) without running the process as root.

MediumTechnical
41 practiced

Discuss strategies to reduce the footprint of node_modules in Docker images for production Node.js applications. Cover approaches including installing only production dependencies, using package managers like pnpm or yarn with workspaces, employing multi-stage builds to compile native modules, and image pruning. Evaluate compatibility and developer ergonomics for each approach.

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.