From d7efb1f3b13691326b8f90d555b07e01fe5d397c Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Mon, 27 Oct 2025 09:50:15 +0000 Subject: [PATCH] add DISABLE_EXTRACT to dockerfile and max-parallel to fix docker workflows Signed-off-by: Simon Smith --- .github/workflows/docker.yml | 4 ++++ docker/Dockerfile | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9eaaa27d..e91b50bd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -42,6 +42,7 @@ jobs: needs: translate strategy: fail-fast: false + max-parallel: 3 matrix: variant: [mongodb, postgresql, mariadb, all, slim] name: Build Docker Image (amd64-${{ matrix.variant }}) @@ -99,6 +100,7 @@ jobs: needs: translate strategy: fail-fast: false + max-parallel: 3 matrix: variant: [mongodb, postgresql, mariadb, all, slim] name: Build Docker Image (arm64-${{ matrix.variant }}) @@ -157,6 +159,7 @@ jobs: needs: translate strategy: fail-fast: false + max-parallel: 3 matrix: variant: [mongodb, postgresql, mariadb, all, slim] name: Build Docker Image (armv7-${{ matrix.variant }}) @@ -215,6 +218,7 @@ jobs: needs: translate strategy: fail-fast: false + max-parallel: 3 matrix: variant: [mongodb, postgresql, mariadb, all, slim] name: Build Docker Image (armv6-${{ matrix.variant }}) diff --git a/docker/Dockerfile b/docker/Dockerfile index 1bc88795..2dce5232 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,6 +2,7 @@ FROM node:lts-alpine3.22 AS builder # Any value inside one of the disable ARGs will be accepted. +ARG DISABLE_EXTRACT="yes" ARG DISABLE_MINIFY="yes" ARG DISABLE_TRANSLATE="yes" # NODE_OPTIONS="--max_old_space_size=4096" @@ -12,14 +13,18 @@ WORKDIR /opt/meshcentral COPY ./ /opt/meshcentral/meshcentral/ # Check the Docker build arguments and if they are empty do the task. -RUN apk add --no-cache python3 make g++ bash -RUN if [ -n "$DISABLE_MINIFY" ] || [ -n "$DISABLE_TRANSLATE" ]; then \ +RUN if [ -n "$DISABLE_EXTRACT" ] || [ -n "$DISABLE_MINIFY" ] || [ -n "$DISABLE_TRANSLATE" ]; then \ echo -e "----------\nPREPARING ENVIRONMENT...\n----------"; \ cd meshcentral && \ npm install html-minifier-terser@7.2.0 jsdom@26.0.0 esprima@4.0.1 && \ cd translate && \ - echo -e "----------\nSTARTING THE EXTRACTING PROCESS...\n----------"; \ - node translate.js extractall && \ + case "$DISABLE_EXTRACT" in \ + false|no|FALSE|NO) \ + echo -e "----------\nSTARTING THE EXTRACTING PROCESS...\n----------"; \ + node translate.js extractall;; \ + *) \ + echo "Setting EXTRACT as disabled.";; \ + esac && \ case "$DISABLE_MINIFY" in \ false|no|FALSE|NO) \ echo -e "----------\nSTARTING THE MINIFYING PROCESS...\n----------"; \