added version-tag to docker image
Simon Schön committed
Jun 10, 2022 at 13:27 UTC
2a179e76a596590473b25e806298ac1125cd9255
1 file changed
+2
-1
docker/docker.build.sh
+2
-1
@@ -24,7 +24,8 @@ function runDockerBuild()
24
STARTTS=$(date +%s);
25
ARGS=$@;
26
27
- BUILD_CMD="docker build -f docker/Dockerfile --force-rm --no-cache ${ARGS} -t meshcentral .";
27
+ APP_VERSION=$(grep -o '"version":\s*"[^"]*"' ./package.json | cut -f4- -d\" | tr -d '"')
28
+ BUILD_CMD="docker build -f docker/Dockerfile --force-rm --no-cache ${ARGS} -t meshcentral:latest -t meshcentral:${APP_VERSION} .";
29
appendOutput "Current build: ${BUILD_CMD}";
30
31
if [ -z "${LOG_FILE}" ]; then ${BUILD_CMD}; else ${BUILD_CMD} &>> "${LOG_FILE}"; fi