fix(ci): docker network prune does not support -a - #6050
Merged
Conversation
docker network prune only accepts -f/--force and --filter; the -a/--all flag is invalid (unlike volume prune), so '-af' aborts with usage error / exit 125.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
The docker-state nuke from PR #6049 fails on the self-hosted runners:
Root cause
docker network pruneonly accepts-f/--forceand--filter— the-a/--allflag is not supported (unlikedocker volume prune, which has-a). Passing-afis an invalid flag combination, so the command aborts with a usage error.Fix
Use
docker network prune -fin both the preflight and post-job nuke steps. Network prune already removes all unused networks, so no-ais needed.Summary by cubic
Fixes CI cleanup by replacing
docker network prune -afwithdocker network prune -fin.github/workflows/ci-builds.ymlpreflight and post-job nuke steps. Previously,-awas invalid for network prune and caused exit 125 on self-hosted runners; now the command runs non-interactively and prunes all unused networks, preventing cleanup failures without changing volume pruning.Written for commit 04eb487. Summary will update on new commits.