This repository was archived by the owner on Nov 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 254
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
down -v doesn't delete anonymous volumes #1755
Copy link
Copy link
Closed
Labels
compatibilityCompatibility with docker-composeCompatibility with docker-compose
Description
Description
docker compose down -v deletes named volumes but not anonymous ones it creates.
Steps to reproduce the issue:
- create a compose file in directory
redis:
services:
redis:
image: redis:6- Note this image has a
VOLUMEDockerfile statement. - Run
docker compose up -dto create the network and container. - When container is created, it also creates an anonymous GUID-named volume.
- Run
docker volume lsto see the anonymous volume listed. - Run
docker compose down -v. - Run
docker volume lsto see the anonymous volume still listed.
Describe the results you received:
anonymous volumes that are unlisted in the compose file, but controlled by the Dockerfile VOLUME statement, are not deleted when you down -v
Describe the results you expected:
Anonymous volumes are deleted with down -v as the behavior was in docker-compose.
Output of docker compose version:
docker compose version
Docker Compose version 2.0.0-beta.3
Output of docker version:
docker version
Client:
Cloud integration: 1.0.14
Version: 20.10.6
API version: 1.41
Go version: go1.16.3
Git commit: 370c289
Built: Fri Apr 9 22:46:57 2021
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.6
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 8728dd2
Built: Fri Apr 9 22:44:56 2021
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: 1.4.4
GitCommit: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
runc:
Version: 1.0.0-rc93
GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Metadata
Metadata
Assignees
Labels
compatibilityCompatibility with docker-composeCompatibility with docker-compose