forked from JointCloud/JCC-RIP
21 lines
572 B
Docker
21 lines
572 B
Docker
FROM --platform=$BUILDPLATFORM node:16.20-alpine3.17 AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
COPY deploy/nginx/ /app/
|
|
RUN npm install && npm run build:stage
|
|
|
|
FROM --platform=$TARGETPLATFORM nginx:stable-alpine
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache ca-certificates && update-ca-certificates && \
|
|
apk add --update tzdata && \
|
|
rm -rf /var/cache/apk/*
|
|
|
|
COPY --from=builder /app/dist /usr/share/nginx/html/jcc-rip
|
|
RUN rm /etc/nginx/conf.d/default.conf
|
|
COPY deploy/nginx/default.conf /etc/nginx/conf.d/default.conf
|
|
ENV TZ=Asia/Shanghai
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"] |