add DISABLE_EXTRACT to dockerfile and max-parallel to fix docker workflows

Signed-off-by: Simon Smith <simonsmith5521@gmail.com>

Simon Smith committed Oct 27, 2025 at 09:50 UTC d7efb1f3b13691326b8f90d555b07e01fe5d397c
2 files changed +13 -4
.github/workflows/docker.yml
+4
@@ -42,6 +42,7 @@ jobs:
42 needs: translate
43 strategy:
44 fail-fast: false
45 + max-parallel: 3
46 matrix:
47 variant: [mongodb, postgresql, mariadb, all, slim]
48 name: Build Docker Image (amd64-${{ matrix.variant }})
@@ -99,6 +100,7 @@ jobs:
100 needs: translate
101 strategy:
102 fail-fast: false
103 + max-parallel: 3
104 matrix:
105 variant: [mongodb, postgresql, mariadb, all, slim]
106 name: Build Docker Image (arm64-${{ matrix.variant }})
@@ -157,6 +159,7 @@ jobs:
159 needs: translate
160 strategy:
161 fail-fast: false
162 + max-parallel: 3
163 matrix:
164 variant: [mongodb, postgresql, mariadb, all, slim]
165 name: Build Docker Image (armv7-${{ matrix.variant }})
@@ -215,6 +218,7 @@ jobs:
218 needs: translate
219 strategy:
220 fail-fast: false
221 + max-parallel: 3
222 matrix:
223 variant: [mongodb, postgresql, mariadb, all, slim]
224 name: Build Docker Image (armv6-${{ matrix.variant }})
docker/Dockerfile
+9 -4
@@ -2,6 +2,7 @@
2 FROM node:lts-alpine3.22 AS builder
3
4 # Any value inside one of the disable ARGs will be accepted.
5 +ARG DISABLE_EXTRACT="yes"
6 ARG DISABLE_MINIFY="yes"
7 ARG DISABLE_TRANSLATE="yes"
8 # NODE_OPTIONS="--max_old_space_size=4096"
@@ -12,14 +13,18 @@ WORKDIR /opt/meshcentral
13 COPY ./ /opt/meshcentral/meshcentral/
14
15 # Check the Docker build arguments and if they are empty do the task.
15 -RUN apk add --no-cache python3 make g++ bash
16 -RUN if [ -n "$DISABLE_MINIFY" ] || [ -n "$DISABLE_TRANSLATE" ]; then \
16 +RUN if [ -n "$DISABLE_EXTRACT" ] || [ -n "$DISABLE_MINIFY" ] || [ -n "$DISABLE_TRANSLATE" ]; then \
17 echo -e "----------\nPREPARING ENVIRONMENT...\n----------"; \
18 cd meshcentral && \
19 npm install html-minifier-terser@7.2.0 jsdom@26.0.0 esprima@4.0.1 && \
20 cd translate && \
21 - echo -e "----------\nSTARTING THE EXTRACTING PROCESS...\n----------"; \
22 - node translate.js extractall && \
21 + case "$DISABLE_EXTRACT" in \
22 + false|no|FALSE|NO) \
23 + echo -e "----------\nSTARTING THE EXTRACTING PROCESS...\n----------"; \
24 + node translate.js extractall;; \
25 + *) \
26 + echo "Setting EXTRACT as disabled.";; \
27 + esac && \
28 case "$DISABLE_MINIFY" in \
29 false|no|FALSE|NO) \
30 echo -e "----------\nSTARTING THE MINIFYING PROCESS...\n----------"; \