liveBook · Manning

Docker volume

A Docker volume is Docker-managed storage mounted into containers whose data persists independently of their writable layers and lifecycles.

How 4 Manning books explain it

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.

Read how Road to Kubernetes explains Docker volume →

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.

Read how Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform explains Docker volume →

Related concepts

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.