Volume not found
The container engine failed to mount a persistent volume because the specified named volume does not exist.
Usually happens because:
- ☑ Named volume has not been created yet
- ☑ Compose expects pre-created external volume
- ☑ Typo in the volume name
🔍 Quick Checklist:
What is Volume not found?
This error occurs when a container attempts to mount a named volume (e.g. -v my-vol:/data or volume mappings in docker-compose.yml) but the volume has not been created on the host system. Docker uses named volumes to persist container data, and mapping to a non-existent named volume causes container startup to fail if configured as an external dependency.
Common Causes
- Volume not created: Referencing a named volume that has not been initialized with 'docker volume create'.
- Docker Compose external volume mismatch: Declaring an external volume inside your compose file when the volume does not exist on the host.
- Typo in volume name: Spelling mistakes inside the CLI command or compose settings.
| Cause | Frequency |
|---|---|
| Named volume not created yet | ⭐⭐⭐⭐⭐ |
| Compose external volume config mismatch | ⭐⭐⭐⭐ |
| Spelling typo in volume name | ⭐⭐⭐ |
Common Mistakes
- Setting the `external: true` flag inside docker-compose files without running the corresponding volume creation command beforehand.
- Confusing relative path bind mounts (`-v ./data:/data`) with named volumes (`-v data:/data`). Named volumes do not start with a dot or slash.
How to Fix
Docker Operations & Verification
List all active Docker volumes and create a new named storage volume.
# 1. List existing named volumes
docker volume ls
# 2. Create the missing named volume
docker volume create production-dbPlatform Specific Fixes
Locating persistent volume storage directories on Linux servers.
# Inspect detailed volume meta specs
docker volume inspect bridge
# Local volumes are stored inside the host filesystem at:
# /var/lib/docker/volumes/Best Practices
- Document host setup commands clearly to avoid missing volume initialization steps.
- Omit `external: true` tags when possible to let Docker Compose automatically create, mount, and manage volume lifecycles.
Frequently Asked Questions (FAQ)
Q: Why does it say volume not found?
The Docker daemon cannot find a named volume matching the name specified in your run command or compose configuration.
Q: How do I list existing volumes?
Run 'docker volume ls' to view all local named volumes.
Q: What is an external volume in Docker Compose?
An external volume is a volume created outside of the compose setup. Declaring 'external: true' tells Compose to expect and use the existing volume rather than creating a new one.
Q: How do I delete unused volumes?
Run 'docker volume prune' to clean up all volumes that are not currently mapped to a container.