IT lexicon › Infra & Ops › Docker volume

Docker volume

Infra & Ops På svenska → Updated: 2026-05-25

Mechanism for persistent storage in Docker containers. Three types: named volumes (Docker-managed), bind mounts (regular host path), tmpfs (in RAM, gone on restart).

Named volumes live outside the container lifecycle, stored in /var/lib/docker/volumes/. Bind mounts give direct access to host files (good for dev). Volume drivers allow remote storage (NFS, AWS EBS, Azure File). Production pattern: bind mounts for config, named volumes for databases. Kubernetes has the same concept with PV/PVC. docker volume prune cleans up unused (after containers are removed).

← Back to the lexicon