From 34d5bd711e300f5a693cfda3fbe1a4f5fd081e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ma=CC=88der?= Date: Fri, 11 Aug 2017 17:08:43 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9D=87=EF=B8=8F=20Don't=20use=20Docker=20cac?= =?UTF-8?q?he=20for=20'master'=20and=20'develop'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index fb2d886..f1b42df 100755 --- a/build.sh +++ b/build.sh @@ -30,14 +30,17 @@ URL="${URL-https://github.com/${SRC_REPO}/netbox/archive/$BRANCH.tar.gz}" if [ "${BRANCH}" == "master" ]; then TAG="${TAG-latest}" + CACHE="--no-cache" elif [ "${BRANCH}" == "develop" ]; then TAG="${TAG-snapshot}" + CACHE="--no-cache" else TAG="${TAG-$BRANCH}" + CACHE="" fi echo "🐳 Building the Docker image '${DOCKER_REPO}/netbox:${TAG}' from the branch '${BRANCH}'." -docker build -f Dockerfile -t "${DOCKER_REPO}/netbox:${TAG}" --build-arg "BRANCH=${BRANCH}" --build-arg "URL=${URL}" --pull . +docker build -t "${DOCKER_REPO}/netbox:${TAG}" --build-arg "BRANCH=${BRANCH}" --build-arg "URL=${URL}" --pull ${CACHE} . echo "✅ Finished building the Docker images '${DOCKER_REPO}/netbox:${TAG}'" if [ "${2}" == "--push" ] ; then