Skip to content

Commit

Permalink
build.sh: cache: fix implementation.
Browse files Browse the repository at this point in the history
Fixes two problems:

1. always need to set VOLUME_OPTIONS when the cache path is used
2. need to quote the value of VOLUME_OPTIONS when setting it.

Signed-off-by: Jon Seymour <[email protected]>
  • Loading branch information
jonseymour committed Mar 18, 2016
1 parent ea5422d commit 2543046
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ docker build -f Dockerfile_build_ubuntu64 -t influxdata/kapacitor-builder $DIR
if test "${KAPACITOR_USE_BUILD_CACHE}" = "true"; then
# create a container that owns the /root/go/src volume used as a cache of go dependency downloads
# ignore failures, since this usually means the container already exists.
docker run --entrypoint=/bin/true --name kapacitor-builder-cache influxdata/kapacitor-builder 2>/dev/null &&
VOLUME_OPTIONS=--volumes-from kapacitor-builder-cache || true
docker run --entrypoint=/bin/true --name kapacitor-builder-cache influxdata/kapacitor-builder 2>/dev/null || true
VOLUME_OPTIONS="--volumes-from kapacitor-builder-cache"
else
VOLUME_OPTIONS=
fi
Expand Down

0 comments on commit 2543046

Please sign in to comment.