Skip to content

Commit 8b618a6

Browse files
figawusha-mandya
andauthored
Add anonymous volumes autoremove info (docker#13471)
* Add anonymous volumes autoremove info Anonymous volumes aren't removed if another container adopts them with `--volumes-from`, see: docker#13435 * Format Note Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
1 parent e396d7a commit 8b618a6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

storage/volumes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,12 @@ the Docker Engine removes the `/foo` volume but not the `awesome` volume.
578578
$ docker run --rm -v /foo -v awesome:/bar busybox top
579579
```
580580

581+
> **Note**:
582+
>
583+
> If another container binds the volumes with
584+
> `--volumes-from`, the volume definitions are _copied_ and the
585+
> anonymous volume also stays after the first container is removed.
586+
581587
### Remove all volumes
582588

583589
To remove all unused volumes and free up space:

0 commit comments

Comments
 (0)