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

Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
Simon Smith 2025-10-27 09:50:15 +00:00
parent 4137132701
commit d7efb1f3b1
2 changed files with 13 additions and 4 deletions

View File

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

View File

@ -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----------"; \