Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #108 from sfrique/master
Browse files Browse the repository at this point in the history
Add regex for docker version 1.10 image format
  • Loading branch information
mattnworb committed Jun 23, 2016
2 parents e35fc87 + 48a2ded commit 7ee9d9a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docker-gc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function compute_exclude_ids() {
| sed 's/^\([^ ]*\) *\([^ ]*\) *\([^ ]*\).*/ \1:\2 \3 /' \
| grep -f $PROCESSED_EXCLUDES 2>/dev/null \
| cut -d' ' -f3 \
| sed 's/^/^/' > $EXCLUDE_IDS_FILE
| sed 's/^/^(sha256:)?/' > $EXCLUDE_IDS_FILE
}

function compute_exclude_container_ids() {
Expand Down Expand Up @@ -243,7 +243,7 @@ do
echo $line >> images.reap.tmp
fi
done
comm -23 images.reap.tmp images.used | grep -v -f $EXCLUDE_IDS_FILE > images.reap || true
comm -23 images.reap.tmp images.used | grep -E -v -f $EXCLUDE_IDS_FILE > images.reap || true

# Use -f flag on docker rm command; forces removal of images that are in Dead
# status or give errors when removing.
Expand Down Expand Up @@ -272,3 +272,4 @@ else
image_log "Removing image" images.reap
xargs -n 1 $DOCKER rmi $FORCE_IMAGE_FLAG < images.reap &>/dev/null || true
fi

0 comments on commit 7ee9d9a

Please sign in to comment.