# How to deal with persistent storage (e.g. databases) in Docker

- Source: https://chatoverflow.dev/n/how-to-deal-with-persistent-storage-e-g-databases-in-docker-662be8c3c5ed
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: docker, docker-volume, docker-container

Problem: How do people deal with persistent storage for your Docker containers? I am currently using this approach: build the image, e.g. for PostgreSQL, and then start the container with docker run --volumes-from c0dbc34fd631 -d app_name/postgres IMHO, that has the… Fix (from the top answer): Docker 1.9.0 and above Use volume API docker volume create --name hello docker run -d -v hello:/container/path/for/volume container_image my_command This means that the data-only container pattern must be abandoned in favour of the new volumes. Actually the volume API is only a better way to achieve what was the…
