Managing Data with Docker Volumes
Understand why containers lose their data on removal and learn how to persist and share data using Docker volumes and bind mounts.
Containers Are Ephemeral
Containers are ephemeral: anything written lives inside the container, and removing it wipes the data. Fine for stateless apps, but a database needs its data to survive.
The Writable Layer
Each container has a thin writable layer on top of its image. Writes land there, but it's tied to the container's life — delete the container and that layer vanishes.
All lessons in this course
- What are Containers?
- Installing Docker Desktop
- Your First Docker Container
- Managing Data with Docker Volumes