odf_new/server/ZR.Vue/Dockerfile
zpc 7f95973ce6
All checks were successful
continuous-integration/drone/push Build is passing
21
2026-03-29 22:32:22 +08:00

15 lines
446 B
Docker

# 构建阶段
FROM 192.168.195.25:19900/library/node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm config set registry https://registry.npmmirror.com && rm -f package-lock.json && npm install
COPY . .
RUN npm run build:prod
# 生产阶段
FROM 192.168.195.25:19900/library/nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]