stream-deploy/docker/nginx/Dockerfile

32 lines
587 B
Docker
Raw Normal View History

2025-12-05 14:14:47 +08:00
FROM ubuntu:24.04 AS builder
RUN apt-get update && \
apt-get install -y nodejs npm && \
rm -rf /var/lib/apt/lists/*
2025-12-06 17:53:25 +08:00
COPY ./docker/nginx/web /build
2025-12-05 14:14:47 +08:00
WORKDIR /build
2025-12-06 22:18:00 +08:00
RUN npm config set registry https://registry.npmmirror.com && \
npm config set fetch-timeout 600000 && \
npm config set fetch-retries 5 && \
npm install --verbose
2025-12-05 14:14:47 +08:00
RUN npm run build:prod
WORKDIR /src/main/resources
RUN ls
WORKDIR /src/main/resources/static
RUN ls
FROM nginx:alpine
ARG TZ=Asia/Shanghai
COPY --from=builder /src/main/resources/static /opt/dist
CMD ["nginx","-g","daemon off;"]