Skip to content

Commit

Permalink
Add support for --no-cache in build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
DonMartin76 committed May 3, 2018
1 parent ab92166 commit ecd60f7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ if [ -z "$DOCKER_TAG" ]; then
export DOCKER_TAG=dev
fi

noCache=""
if [ ! -z "${DOCKER_NOCACHE}" ]; then
echo "INFO: Building using --no-cache"
noCache="--no-cache"
fi

echo "============================================"
echo "Building normal image..."
echo "============================================"
Expand All @@ -23,7 +29,7 @@ git rev-parse --abbrev-ref HEAD > git_branch

export BUILD_ALPINE=""
normalImageName="${DOCKER_PREFIX}kong:${DOCKER_TAG}"
docker build --pull -t ${normalImageName} .
docker build --pull -t ${normalImageName} . ${noCache}

# echo "============================================"
# echo "Building alpine image..."
Expand Down

0 comments on commit ecd60f7

Please sign in to comment.