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

Write a minimal, secure multi-stage Dockerfile for a statically-linked Go service: build the binary in a builder stage and produce a minimal final image using scratch or a distroless base, running as a non-root user. Explain how CGO_ENABLED affects which final base image you can use, and how you'd embed build metadata (version, build time) into the binary.

MediumTechnical
49 practiced

Your CI Docker builds intermittently fail while downloading packages, with timeouts or 502s. Walk through how you'd systematically troubleshoot and mitigate this: retries, package mirrors, dependency caching, and how you'd rule out DNS or proxy issues on the CI runner network.

MediumTechnical
52 practiced

For a stateful database service, would you use a named Docker volume or a host bind mount in development versus in production, and why? Discuss portability, performance, backup strategy, and permission issues you might hit (including SELinux on some Linux hosts).

HardTechnical
51 practiced

A faulty release tagged prod just got deployed. Walk through how you'd perform an immediate rollback to the previous known-good image using image digests with a Docker Compose stack, and how automation (recording the last-known-good digest, a one-command rollback script) could make this safer and faster next time.

HardTechnical
39 practiced

You're asked to harden a container image that currently runs as root, ships shell utilities, and is built from a large general-purpose base image, exposing an API to untrusted input. Propose a runtime hardening policy: seccomp profiles, dropping Linux capabilities, a read-only root filesystem, rootless containers, and how you'd enforce and audit these at deploy time, while keeping the service actually operable.

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.