From 8b618a6795ddc8775e7280e4a4e08044edf23a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolaj=20Gr=C3=A6sholt?= Date: Fri, 8 Oct 2021 13:07:29 +0200 Subject: [PATCH] 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> --- storage/volumes.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/storage/volumes.md b/storage/volumes.md index 163b9e5079..61ea2088c8 100644 --- a/storage/volumes.md +++ b/storage/volumes.md @@ -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: