DevOps · interactive
Docker volumes
A container's own filesystem is a thin writable layer that's deleted with the container. Databases, uploads and anything else you want to keep belongs in a volume or a bind mount. Run the same steps with each.
docker run postgres
- Start the container0 rows
- Insert 3 rows
- docker restart
- docker rm -f, then docker run again
- docker compose down -v
0 rows
Restarting keeps the container and its data; removing it is what matters.
Where data lives
Step 1 of 4 · read left to right
In production
Tools and technologies
Persistent data in containers lives in volumes.
Not tied to one language — use these names when you search docs or design a system.