Volumes — by Docker Docs
Docs on persisting container data with volumes, which Docker calls the preferred mechanism, versus bind mounts that tie you to the host's folder layout. Mentions read-only mounts, subdirectory mounts, volume drivers for NFS/CIFS, and the gotcha that mounting over a non-empty directory hides its existing files. Volumes are not removed automatically when a container is deleted.
Quick steps
- Use --mount rather than --volume when you need driver options or subpaths
- Clean up unused volumes with docker volume prune
Paraphrased from the source. Menus can differ by version, so check the original for full details.
Source: Volumes by Docker Docs. Licence: Link only (©).
- Source reviewed
- 2026-11-02
- Link checked
- 2026-11-02
- Tested hands-on
- Not by Oddbyte.Me