31 lines
628 B
Docker
31 lines
628 B
Docker
FROM registry.t-aaron.com/ubuntu:24.04 AS builder
|
|
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y nodejs npm && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY ./docker/nginx/web /build
|
|
WORKDIR /build
|
|
|
|
RUN npm config set registry https://registry.npmmirror.com && \
|
|
npm config set fetch-timeout 600000 && \
|
|
npm config set fetch-retries 5 && \
|
|
npm install --verbose
|
|
RUN npm run build:prod
|
|
|
|
WORKDIR /src/main/resources
|
|
RUN ls
|
|
|
|
WORKDIR /src/main/resources/static
|
|
RUN ls
|
|
|
|
FROM registry.t-aaron.com/nginx:alpine
|
|
|
|
ARG TZ=Asia/Shanghai
|
|
|
|
|
|
COPY --from=builder /src/main/resources/static /opt/dist
|
|
|
|
CMD ["nginx","-g","daemon off;"]
|