Skip to content

Commit

Permalink
Enhance Docker image cleanup in CI test script (#5751)
Browse files Browse the repository at this point in the history
This patch improves Docker image cleanup to ensure that all images which have
not been used recently are also deleted (in addition to dangling images).

Signed-off-by: Shuyang Xin <[email protected]>
  • Loading branch information
XinShuYang authored Nov 30, 2023
1 parent f249cce commit 1980001
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci/jenkins/test-vmc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@ function deliver_antrea {
# The cleanup and stats are best-effort.
set +e
docker images | grep "${JOB_NAME}" | awk '{print $3}' | uniq | xargs -r docker rmi -f > /dev/null
# Clean up dangling images generated in previous builds. Recent ones must be excluded
# Clean up dangling and unused images generated in previous builds. Recent ones must be excluded
# because they might be being used in other builds running simultaneously.
docker image prune -f --filter "until=1h" > /dev/null
docker image prune -af --filter "until=1h" > /dev/null
docker system df -v
set -e

Expand Down

0 comments on commit 1980001

Please sign in to comment.