Docker hotfix for npm modules (#7075)

* Added Dockerfile improvements for parsing and building

* Downgraded versions to match meshcentral.js

* removed unneeded removal

* syntax fix.

* added label

* Overwritten error fix.

* Remove label
This commit is contained in:
DaanSelen 2025-06-09 13:23:57 +02:00 committed by GitHub
parent 28b31b2476
commit 5044339c80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,6 +44,9 @@ RUN rm -rf /opt/meshcentral/meshcentral/node_modules
FROM alpine:3.21 FROM alpine:3.21
# copy files from builder-image
COPY --from=builder /opt/meshcentral/meshcentral /opt/meshcentral/meshcentral
# environment variables # environment variables
ENV NODE_ENV="production" \ ENV NODE_ENV="production" \
CONFIG_FILE="/opt/meshcentral/meshcentral-data/config.json" \ CONFIG_FILE="/opt/meshcentral/meshcentral-data/config.json" \
@ -166,11 +169,9 @@ RUN case "$INCLUDE_MARIADB_TOOLS" in \
exit 1;; \ exit 1;; \
esac esac
# copy files from builder-image
COPY --from=builder /opt/meshcentral/meshcentral /opt/meshcentral/meshcentral
# install dependencies from package.json # install dependencies from package.json
RUN cd meshcentral && npm install RUN cd meshcentral && \
npm install
# Expose needed ports # Expose needed ports
EXPOSE 80 443 EXPOSE 80 443