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

Commit

Permalink
Do not exclude everything when excluding nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanhs committed Aug 21, 2015
1 parent c5cfdc2 commit 2ab30d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker-gc
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ function compute_exclude_container_ids() {
PROCESSED_EXCLUDES=`cat $EXCLUDE_CONTAINERS_FROM_GC \
| xargs \
| sed -e 's/ /\|/g'`
# The empty string would match everything
if [ "$EXCLUDE_CONTAINERS_FROM_GC" = "" ]; then
touch $EXCLUDE_CONTAINER_IDS_FILE
return
fi
# Find all docker images
# Filter out with matching names
# and put them to $EXCLUDE_CONTAINER_IDS_FILE
Expand Down

0 comments on commit 2ab30d5

Please sign in to comment.