Merge pull request #1419 from KagurazakaNyaa/master

chore: reduce web image size
This commit is contained in:
YuMao 2024-10-30 19:35:11 +08:00 committed by GitHub
commit c05038c1f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -1,17 +1,17 @@
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
RUN chmod a+x ./install-dependents.sh &&\
RUN apk add --no-cache wget &&\
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