From 2a179e76a596590473b25e806298ac1125cd9255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sch=C3=B6n?= Date: Fri, 10 Jun 2022 13:27:17 +0200 Subject: [PATCH] added version-tag to docker image --- docker/docker.build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/docker.build.sh b/docker/docker.build.sh index ddbc1b12..457106a3 100644 --- a/docker/docker.build.sh +++ b/docker/docker.build.sh @@ -24,7 +24,8 @@ function runDockerBuild() STARTTS=$(date +%s); ARGS=$@; - BUILD_CMD="docker build -f docker/Dockerfile --force-rm --no-cache ${ARGS} -t meshcentral ."; + APP_VERSION=$(grep -o '"version":\s*"[^"]*"' ./package.json | cut -f4- -d\" | tr -d '"') + BUILD_CMD="docker build -f docker/Dockerfile --force-rm --no-cache ${ARGS} -t meshcentral:latest -t meshcentral:${APP_VERSION} ."; appendOutput "Current build: ${BUILD_CMD}"; if [ -z "${LOG_FILE}" ]; then ${BUILD_CMD}; else ${BUILD_CMD} &>> "${LOG_FILE}"; fi