switch to node from alpine

Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
Simon Smith
2025-10-26 17:59:56 +00:00
parent 362a1b8913
commit 00f1ba7c42
2 changed files with 9 additions and 22 deletions

View File

@@ -24,10 +24,7 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Node.js (LTS)
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
@@ -79,10 +76,7 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Node.js (LTS)
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
@@ -134,10 +128,7 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Node.js (LTS)
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
@@ -189,10 +180,7 @@ jobs:
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Node.js (LTS)
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:

View File

@@ -48,12 +48,12 @@ RUN rm -rf /opt/meshcentral/meshcentral/docs
### STAGE 2 PRECOMPILE DEPS MODULE
FROM alpine:3.22 AS dep-compiler
FROM node:lts-alpine3.22 AS dep-compiler
RUN apk update && \
echo -e "----------\nINSTALLING ALPINE PACKAGES...\n----------"; \
apk add --no-cache --update \
bash gcc g++ make nodejs npm python3 tzdata
gcc g++ make python3 linux-headers
RUN mkdir -p /opt/meshcentral
COPY ./package.json /opt/meshcentral/package.json
@@ -63,7 +63,7 @@ RUN npm install --save-exact --no-audit --no-optional --omit=optional --verbose
&& npm install --save-exact --no-audit --no-optional --omit=optional --verbose modern-syslog@1.2.0 telegram@2.26.22
### STAGE 3 RUNTIME
FROM alpine:3.22 AS runtime
FROM node:lts-alpine3.22 AS runtime
# Copy prepared app from builder stage
COPY --from=builder /opt/meshcentral/meshcentral /opt/meshcentral/meshcentral
@@ -128,15 +128,14 @@ WORKDIR /opt/meshcentral
RUN apk update && \
echo -e "----------\nINSTALLING ALPINE PACKAGES...\n----------"; \
apk add --no-cache --update \
bash curl jq nodejs npm tzdata && \
bash curl jq tzdata && \
rm -rf /var/cache/* \
/tmp/* \
/usr/share/man/ \
/usr/share/doc/ \
/var/log/* \
/var/spool/* \
/usr/lib/debug/ && \
npm install -g npm@latest
/usr/lib/debug/
RUN case "$PREINSTALL_LIBS" in \
true|yes|TRUE|YES) \