chore: change base image to node:lts-alpine to reduce image size

This commit is contained in:
KagurazakaNyaa 2024-10-30 16:41:02 +08:00
parent 3822a7bfb4
commit d6f0691828
2 changed files with 5 additions and 6 deletions

View File

@ -1,7 +1,7 @@
ARG EMBEDDED_JAVA_VERSION=21
ARG BUILDPLATFORM=linux/amd64
FROM --platform=${BUILDPLATFORM} node:lts AS builder
FROM --platform=${BUILDPLATFORM} node:lts-alpine AS builder
WORKDIR /src
COPY . /src
@ -9,9 +9,8 @@ COPY . /src
RUN chmod a+x ./install-dependents.sh &&\
chmod a+x ./build.sh &&\
./install-dependents.sh &&\
./build.sh
RUN wget --input-file=lib-urls.txt --directory-prefix=production-code/daemon/lib/ &&\
./build.sh &&\
wget --input-file=lib-urls.txt --directory-prefix=production-code/daemon/lib/ &&\
chmod a+x production-code/daemon/lib/*
FROM eclipse-temurin:${EMBEDDED_JAVA_VERSION}-jdk

View File

@ -1,5 +1,5 @@
ARG BUILDPLATFORM=linux/amd64
FROM --platform=${BUILDPLATFORM} node:lts AS builder
FROM --platform=${BUILDPLATFORM} node:lts-alpine AS builder
WORKDIR /src
COPY . /src
@ -9,7 +9,7 @@ RUN chmod a+x ./install-dependents.sh &&\
./install-dependents.sh &&\
./build.sh
FROM node:lts
FROM node:lts-alpine
WORKDIR /opt/mcsmanager/web