Skip to content
Preptima

Containers & Docker interview questions

Namespaces and cgroups, image layering, multi-stage builds, and container security basics.

4 questions in DevOps & Cloud.

medium3

mediumScenarioConceptDesign

Your source control stores every version of a 200MB binary and the repository is now 40GB. What is being stored, and why can you not delete it?

Roughly 200 near-full copies, because delta compression works on text and a relinked binary differs throughout, so each version costs almost its own size. Deleting the file changes nothing: history is content-addressed and every past commit still reaches the blob. The design fix is that build outputs belong in a registry that can expire them, because version control is built never to forget.

6 minmid, senior, staff
mediumConceptScenario

What happens when a container hits its CPU limit, and what happens when it hits its memory limit?

Container CPU and memory limits fail differently: CPU limits throttle work, while memory limits can trigger OOMKilled restarts. Debug by comparing requests, limits, actual usage and runtime-specific memory settings. Use this containers answer to show the decision, trade-off, and evidence rather than a memorised definition. It also connects cgroups to the point an interviewer is testing.

5 minmid, senior, staff

hard1