Kubernetes/Docker/Dockerfile/Nginx/Dockerfile-node
offends 7a2f41e7d6
All checks were successful
continuous-integration/drone Build is passing
synchronization
2024-08-07 18:54:39 +08:00

17 lines
281 B
Plaintext

# 多阶段构建
FROM node:14 as build
COPY . /app
WORKDIR /app
RUN npm config set registry https://registry.npmmirror.com \
&& npm install \
&& npm run build:prod
FROM nginx:alpine
COPY --from=build /app/dist /app/www
COPY ./web.conf /etc/nginx/conf.d/default.conf