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

How do you set CPU and memory limits for a Docker container, both at runtime (--memory, --cpus, --memory-swap) and in Compose? Why do these limits matter for reliability when many containers share a host, and what's the practical difference between limiting resources in Docker versus relying on the host OS alone?

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

EasyTechnical
52 practiced

Why is it recommended for a containerized application to write logs to stdout and stderr instead of a local file? What operational benefits does that give the team running it?

HardTechnical
36 practiced

Design a Docker image build strategy for a Java Spring Boot application to optimize build cache and startup time. Consider Spring Boot layered JARs versus jlink versus a buildpacks-based build, provide an example of how dependencies get cached across builds under your chosen approach, and explain the trade-offs against using a GraalVM native image.

HardTechnical
39 practiced

You need to ship a container for a Python model that depends on NumPy, SciPy, and a custom C++ or CUDA extension compiled from source. Explain how you'd structure a multi-stage build to compile the native dependencies in one stage and copy only the runtime artifacts into a minimal final stage, and how you'd avoid runtime linker or ABI mismatches between the two stages.

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.