-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update docs/command output for volume prune to specify when named volumes will be deleted #4079
Conversation
In previous versions of the Docker API, `system prune --volumes` and `volume prune` would remove all dangling volumes. With API v1.42, this was changed so that only anonymous volumes would be removed unless the `all` filter was specified. Update the docs to reflect this. Signed-off-by: Dalton Miner <[email protected]>
Currently, the output of the `volume prune` command is potentially confusing, because only anonymous dangling volumes are removed by default. Update help text and warning output accordingly. Signed-off-by: Dalton <[email protected]>
@thaJeztah Any chance you could look at this? I think it would alleviate a lot of the pain that I and other people commenting in #4028 experienced updating the docs to be more clear about what should happen. |
Update LGTM but there's some conflicts, likely because some of the changes were merged as part of #4218 |
|
||
Total reclaimed space: 36 B | ||
|
||
$ docker volume prune --filter all=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably showcase the new -a
flag here instead.
I ran into #4028 because of the currently misleading docs/CLI output. As such, it would be great to have this land :-) I presume the one remaining review comment + resolving the conflicts are the only blockers? |
@dwminer Hi! Do you know if you might get a chance to resolve the conflicts here and make that |
In previous versions of the Docker API, `system prune --volumes` and `volume prune` would remove all dangling volumes. With API v1.42, this was changed so that only anonymous volumes would be removed unless the all filter was specified. Some of the docs were updated in docker#4218, however, there were a couple of places left that didn't make the anonymous vs named volumes distinction clear. This replaces docker#4079, which was bitrotted by docker#4218. See also docker#4028. Signed-off-by: Ed Morley <[email protected]>
In previous versions of the Docker API, `system prune --volumes` and `volume prune` would remove all dangling volumes. With API v1.42, this was changed so that only anonymous volumes would be removed unless the all filter was specified. Some of the docs were updated in docker#4218, however, there were a couple of places left that didn't make the anonymous vs named volumes distinction clear. This replaces docker#4079, which was bitrotted by docker#4218. See also docker#4028. Closes docker#4079. Signed-off-by: Ed Morley <[email protected]>
In previous versions of the Docker API, `system prune --volumes` and `volume prune` would remove all dangling volumes. With API v1.42, this was changed so that only anonymous volumes would be removed unless the all filter was specified. Some of the docs were updated in docker#4218, however, there were a couple of places left that didn't make the anonymous vs named volumes distinction clear. This replaces docker#4079, which was bitrotted by docker#4218. See also docker#4028. Closes docker#4079. Signed-off-by: Ed Morley <[email protected]> (cherry picked from commit 6e2e92d) Signed-off-by: Sebastiaan van Stijn <[email protected]>
Thanks for the follow-up and replacement PR @edmorley; life happened and I never found the time to return to this. 🙂 |
No problem! Thank you for opening this PR which saved me a fair bit of time understanding where would need updating :-) |
In previous versions of the Docker API,
system prune --volumes
andvolume prune
would remove all dangling volumes. With API v1.42, this was changed so that only anonymous volumes would be removed unless theall
filter was specified. Update the docs and command output to reflect this.Fixes #4028
- What I did
Updated documentation/warning output for the
system_prune
andvolume_prune
commands to reflect that only anonymous volumes are removed by default.- How I did it
volume/prune.go
, specify that anonymous volumes will be removed. Ifall=1
is set, indicate that named volumes will be removed too.- How to verify it
docker volume prune
docker volume prune --filter all=1
- Description for the changelog
Update
volume prune
output to be more specific about whether named volumes will be removed.- A picture of a cute animal (not mandatory but encouraged)