first
This commit is contained in:
28
docker/nginx/Dockerfile
Normal file
28
docker/nginx/Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
FROM ubuntu:24.04 AS builder
|
||||
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y nodejs npm && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY ./web /build
|
||||
WORKDIR /build
|
||||
|
||||
RUN npm --registry=https://registry.npmmirror.com install
|
||||
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;"]
|
||||
|
||||
Reference in New Issue
Block a user