⚡ ~/naveed Interview Prep
⚡ Portfolio Home ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 998+ Scenarios ☸️ Kubernetes Mastery Hub 24 Modules 🎮 DevOps Arcade & Quizzes Subnet Blitz ⚡ 🗺️ DevOps Roadmaps PDFs & Guides 🤖 Morpheus Analysis AI Quant ↗ 🛠️ Developer Tools Utilities 🧪 Labs & Experiments 📄 Interactive CV & Certs 🔗 All Links & Socials ⚡ Join The Dispatch (Weekly SRE Newsletter) →
Staff SRE / Principal Architect [L3] Linux Linux / SRE — Scenario-Based Interview Questions Staff SRE Scenario [L3]

Q: You need to debug a broken Docker image, but the container instantly crashes upon starting, so you can't `docker exec` into it. You want to inspect the actual files inside the image layer directly on the Linux host disk. Where in the filesystem do you look?

Docker does not store containers as large VM .vmdk files. It uses a Union Filesystem (typically overlay2).

#Linux #Linux / SRE — Scenario-Based Interview Questions #L3 #SRE #Systems #Troubleshooting
🎙️ Candidate Opening & Architectural Context
""Never reboot a server blindly; always capture top process telemetry, lsof descriptors, and thread dumps first. The interviewer is testing: The overlay2 filesystem, container storage drivers.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third.""
Advertisement

🛠️ Production Runbook & Step-by-Step Resolution

1️⃣

Initial Diagnostics & Root Cause Analysis

Docker does not store containers as large VM .vmdk files. It uses a Union Filesystem (typically overlay2).

  • Run docker inspect .
  • Look at the GraphDriver.Data.MergedDir attribute.
  • CD into that absolute path (/var/lib/docker/overlay2/abc123.../merged).
2️⃣

Remediation & Permanent Safeguards

All image layers and actively mutated container filesystems exist as raw directories located in /var/lib/docker/overlay2/. To find the exact directory for the broken image: There, you will see a perfect, unbooted replica of the container's root filesystem ( /etc, /usr, /var). You can use standard Linux tools (cat, vim) directly on the host to debug the bad config file causing the crash.

💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Run docker inspect .."
⚡ 60-Second Elevator Pitch Talking Points
  • Run docker inspect .
  • Look at the GraphDriver.Data.MergedDir attribute.
  • CD into that absolute path (/var/lib/docker/overlay2/abc123.../merged).
Advertisement
Want more Linux scenarios?
Explore our complete collection of scenario-based Linux interview runbooks.
Browse All Linux Questions →

📚 Related Production Scenarios in Linux