Skip to content

Why data in a volume survives docker rm

Select an icon to see what it is.

Step 3 of 6

The volume is still there

A volume belongs to Docker, not to the container that used it. docker volume ls asks GET /volumes, and appdata is still listed. Its directory and a.txt are untouched.

$ docker volume ls

GET /v1.45/volumes

{
"Volumes": [
{
"Name": "appdata"
"Driver": "local"
"Mountpoint": "/var/lib/docker/volumes/appdata/_data"
}
]
}