Add anonymous volumes autoremove info (#13471)

* Add anonymous volumes autoremove info

Anonymous volumes aren't removed if another container adopts them with `--volumes-from`, see: https://github.com/docker/docker.github.io/issues/13435

* Format Note

Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
This commit is contained in:
Nicolaj Græsholt 2021-10-08 13:07:29 +02:00 committed by GitHub
parent e396d7aa86
commit 8b618a6795
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -578,6 +578,12 @@ the Docker Engine removes the `/foo` volume but not the `awesome` volume.
$ docker run --rm -v /foo -v awesome:/bar busybox top
```
> **Note**:
>
> If another container binds the volumes with
> `--volumes-from`, the volume definitions are _copied_ and the
> anonymous volume also stays after the first container is removed.
### Remove all volumes
To remove all unused volumes and free up space: