mirror of
https://github.com/MCSManager/MCSManager.git
synced 2024-11-21 03:12:10 +08:00
Merge pull request #1419 from KagurazakaNyaa/master
chore: reduce web image size
This commit is contained in:
commit
c05038c1f1
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user