added version-tag to docker image

This commit is contained in:
Simon Schön 2022-06-10 13:27:17 +02:00
parent cbc3ab49b6
commit 2a179e76a5

View File

@ -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