mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-20 18:06:05 -05:00
switch to node from alpine
Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
20
.github/workflows/myothertest.yml
vendored
20
.github/workflows/myothertest.yml
vendored
@@ -24,10 +24,7 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
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
|
- name: Log in to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -79,10 +76,7 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
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
|
- name: Log in to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -134,10 +128,7 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
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
|
- name: Log in to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -189,10 +180,7 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
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
|
- name: Log in to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -48,12 +48,12 @@ RUN rm -rf /opt/meshcentral/meshcentral/docs
|
|||||||
|
|
||||||
### STAGE 2 PRECOMPILE DEPS MODULE
|
### STAGE 2 PRECOMPILE DEPS MODULE
|
||||||
|
|
||||||
FROM alpine:3.22 AS dep-compiler
|
FROM node:lts-alpine3.22 AS dep-compiler
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
echo -e "----------\nINSTALLING ALPINE PACKAGES...\n----------"; \
|
echo -e "----------\nINSTALLING ALPINE PACKAGES...\n----------"; \
|
||||||
apk add --no-cache --update \
|
apk add --no-cache --update \
|
||||||
bash gcc g++ make nodejs npm python3 tzdata
|
gcc g++ make python3 linux-headers
|
||||||
|
|
||||||
RUN mkdir -p /opt/meshcentral
|
RUN mkdir -p /opt/meshcentral
|
||||||
COPY ./package.json /opt/meshcentral/package.json
|
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
|
&& npm install --save-exact --no-audit --no-optional --omit=optional --verbose modern-syslog@1.2.0 telegram@2.26.22
|
||||||
### STAGE 3 RUNTIME
|
### STAGE 3 RUNTIME
|
||||||
|
|
||||||
FROM alpine:3.22 AS runtime
|
FROM node:lts-alpine3.22 AS runtime
|
||||||
|
|
||||||
# Copy prepared app from builder stage
|
# Copy prepared app from builder stage
|
||||||
COPY --from=builder /opt/meshcentral/meshcentral /opt/meshcentral/meshcentral
|
COPY --from=builder /opt/meshcentral/meshcentral /opt/meshcentral/meshcentral
|
||||||
@@ -128,15 +128,14 @@ WORKDIR /opt/meshcentral
|
|||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
echo -e "----------\nINSTALLING ALPINE PACKAGES...\n----------"; \
|
echo -e "----------\nINSTALLING ALPINE PACKAGES...\n----------"; \
|
||||||
apk add --no-cache --update \
|
apk add --no-cache --update \
|
||||||
bash curl jq nodejs npm tzdata && \
|
bash curl jq tzdata && \
|
||||||
rm -rf /var/cache/* \
|
rm -rf /var/cache/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/usr/share/man/ \
|
/usr/share/man/ \
|
||||||
/usr/share/doc/ \
|
/usr/share/doc/ \
|
||||||
/var/log/* \
|
/var/log/* \
|
||||||
/var/spool/* \
|
/var/spool/* \
|
||||||
/usr/lib/debug/ && \
|
/usr/lib/debug/
|
||||||
npm install -g npm@latest
|
|
||||||
|
|
||||||
RUN case "$PREINSTALL_LIBS" in \
|
RUN case "$PREINSTALL_LIBS" in \
|
||||||
true|yes|TRUE|YES) \
|
true|yes|TRUE|YES) \
|
||||||
|
|||||||
Reference in New Issue
Block a user