Where Should Database Data Live?
You run PostgreSQL in a container. You want the data to survive docker rm and container upgrades. What should you use?
docker rm
Choose one answer
A named volume (or bind mount) mounted at the database's data directory.
The --restart always flag.
--restart always
docker commit after every write.
docker commit
Nothing — container filesystems are persistent by default.