Skip to content
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

fix: Add filter all=true to volume prune #77

Merged
merged 1 commit into from
May 17, 2023
Merged

Conversation

HofmeisterAn
Copy link
Contributor

@HofmeisterAn HofmeisterAn commented May 16, 2023

What does this PR do?

The pull request checks Docker's API version. If the version is equal or greater than 1.42, it adds all=true to the volume prune filter.

Why is it important?

The latest Moby release (v23.0.0), introduces a breaking API change. It is not backwards compatible. I checked an older version (Docker Desktop for Mac 4.14.1). The mentioned API version requires another filter (all=true) to prune all volumes. Without the additional filter, only anonymous volumes (those without names) are removed.

Do you have any better idea in mind to check the API version?

Related issues

@HofmeisterAn HofmeisterAn added the bug An issue with the project label May 16, 2023
@HofmeisterAn HofmeisterAn requested a review from a team as a code owner May 16, 2023 11:49
main.go Show resolved Hide resolved
Copy link
Contributor

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

main.go Show resolved Hide resolved
@mdelapenya
Copy link
Contributor

@HofmeisterAn do you think we should produce a v0.4.1 patch release?

@mdelapenya mdelapenya merged commit 82e1555 into main May 17, 2023
4 checks passed
@mdelapenya mdelapenya deleted the bugfix/prune-volume branch May 17, 2023 07:25
@HofmeisterAn
Copy link
Contributor Author

@HofmeisterAn do you think we should produce a v0.4.1 patch release?

Yes, then we can include it in the upcoming .NET release.

@mdelapenya
Copy link
Contributor

Sweet! Let's include also #71 in the new release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue with the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ryuk does not prune volumes (Moby >= v23.0.0, DD >= 4.19.0)
2 participants