Docker volume
A Docker volume is Docker-managed storage mounted into containers whose data persists independently of their writable layers and lifecycles.
Road to Kubernetes
A Docker volume is storage mounted into a container that can persist data independently of the container filesystem and may be shared with the host or other containers.
- How it is used
- Makes ephemeral containers stateful by mounting storage for data that must survive container changes, including database data.
- How deep it goes
- Works through CLI mounts and Compose declarations, including ownership and deletion behavior; does not develop storage internals.
- Examples
- Uses a Python container’s shared sample file, Compose YAML mounts, and a Redis service with a `/data` mount.
- What you can do after
- Operate/configure it with `docker run -v` or Compose, verify mounted files, and avoid deleting needed managed-volume data.
Rust Servers, Services, and Apps
A Docker volume is Docker-managed persistent storage whose contents exist independently of a container's lifecycle.
- How it is used
- Persists PostgreSQL data across container runs in a Docker Compose deployment.
- How deep it goes
- Explains Docker-managed persistence, volume creation, and a Compose mount, but not backup or remote-driver procedures.
- Examples
- Mounts tutor-data at /var/lib/postgresql/data for a PostgreSQL container.
- What you can do after
- Configure a named volume and mount it as PostgreSQL’s data directory in Docker Compose.
Read how Rust Servers, Services, and Apps explains Docker volume →
100 SQL Server Mistakes and How to Avoid Them
A Docker volume is a Docker-managed persistent storage resource whose data resides outside a container's writable layer.
- How it is used
- Deploys SQL Server containers while keeping data after container removal.
- How deep it goes
- Defines volumes, explains host placement and driver choices, and demonstrates creation and container mapping commands.
- Examples
- Uses the sqldata volume and a SQL Server 2022 container mapped to /var/opt/mssql.
- What you can do after
- Operate/configure a SQL Server container with persistent storage using Docker volume and run commands.
Read how 100 SQL Server Mistakes and How to Avoid Them explains Docker volume →
Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform
A Docker volume is persistent storage managed separately from a container's writable filesystem and lifecycle.
- How it is used
- Shares host code and caches with development containers, enabling live reload and faster repeated npm installs.
- How deep it goes
- Explains Compose mappings and cleanup behavior, stopping short of broader volume administration.
- Examples
- Uses source-code and npm-cache mounts in a history microservice Compose service.
- What you can do after
- Configure Docker Compose mounts for live reload, cache retention, and clean volume-backed restarts.
Related concepts
- containeruses · A software container is an isolated execution environment that packages an application and its dependencies while sharing the host operating system kernel.
- configmapused by · A ConfigMap is a Kubernetes API resource that stores non-confidential configuration data as key-value pairs for use by workloads and other cluster components.
- docker compose downconfigured by · docker compose down is a Docker Compose command that stops and removes service containers and networks, optionally removing managed volumes.
- stateful infrastructureconfigures · Stateful infrastructure is infrastructure whose operation or stored data includes persistent state that survives process, instance, or resource replacement.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



