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

DaanSelen committed Jun 9, 2025 at 13:23 UTC 5044339c80183f4dc8d5a9b490ff27d60e80ab95
1 file changed +5 -4
docker/Dockerfile
+5 -4
@@ -44,6 +44,9 @@ RUN rm -rf /opt/meshcentral/meshcentral/node_modules
44
45 FROM alpine:3.21
46
47 +# copy files from builder-image
48 +COPY --from=builder /opt/meshcentral/meshcentral /opt/meshcentral/meshcentral
49 +
50 # environment variables
51 ENV NODE_ENV="production" \
52 CONFIG_FILE="/opt/meshcentral/meshcentral-data/config.json" \
@@ -166,11 +169,9 @@ RUN case "$INCLUDE_MARIADB_TOOLS" in \
169 exit 1;; \
170 esac
171
169 -# copy files from builder-image
170 -COPY --from=builder /opt/meshcentral/meshcentral /opt/meshcentral/meshcentral
171 -
172 # install dependencies from package.json
173 -RUN cd meshcentral && npm install
173 +RUN cd meshcentral && \
174 + npm install
175
176 # Expose needed ports
177 EXPOSE 80 443