beginnerImages, Layers, Caching & Container Lifecycle
What happens to a container's writable layer when you delete the container?
It is permanently deleted. Any files written during the container's life that weren't stored in a volume or bind mount are lost. The underlying image layers are unaffected since they are shared, read-only, and owned by the image, not the container.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response