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

Why should a container process run as non-root in production, especially one that processes sensitive data or is exposed to untrusted input? Show the Dockerfile techniques to create a non-root user and switch to it, and explain how to still allow something like binding to a privileged port below 1024 without running as root.

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.

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.

MediumSystem Design
37 practiced

Design a Docker Compose setup for a small local development platform: an app service, a background worker, an API, a database for metadata, and an object-storage emulator for artifacts. What services, networks, volumes, environment variables, and startup dependencies (depends_on, health-gated startup) would you define so the stack is reliable and easy for a new developer to bring up?

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?

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.