Keeping data
between container sessions
This section describes how to keep data between container sessions and how to avoid some pitfalls.
Docker Docs: Manage data in Docker
Generally there are two approaches:
- Keeping data inside containers
- Keeping data outside containers
- in volumes
- in bind mounts
Before persisting data outside the container, you should read the section Manage data in Docker in the official Docker documentation.