Create a Volume¶
When to Use This Guide¶
Use this guide to create a named volume, Docker-managed storage that keeps data safe even when a container is removed.
Step 1: Create the Volume¶
Step 2: Confirm It Exists¶
my-data will appear in the list.
Step 3: Inspect It¶
See its details, including where Docker stores it.
Removing a Volume¶
A volume stays until you delete it deliberately. Remove one with:
To clear all volumes not used by any container:
Common Issues¶
"volume is in use"
A container is still attached. Remove that container first, then remove the volume.