docker run -v mydata:/app/data myimage

Category: Docker

docker run -v mydata:/app/data myimage

Mount a named volume to /app/data inside the container

Mounts a named volume at /app/data inside the container — data persists between container restarts.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.