mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-25 03:56:09 -05:00
@@ -4,6 +4,7 @@ FROM node:lts-alpine3.22 AS builder
|
||||
# Any value inside one of the disable ARGs will be accepted.
|
||||
ARG DISABLE_MINIFY="yes"
|
||||
ARG DISABLE_TRANSLATE="yes"
|
||||
ARG DISABLE_EXTRACT="yes"
|
||||
# NODE_OPTIONS="--max_old_space_size=4096"
|
||||
# If your process gets OOM killed, perhaps the above will help.
|
||||
|
||||
@@ -13,13 +14,17 @@ 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 && \
|
||||
cd meshcentral/translate && \
|
||||
node translate.js || true && \
|
||||
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----------"; \
|
||||
|
||||
Reference in New Issue
Block a user