dashboard/Dockerfile

14 lines
363 B
Docker
Raw Normal View History

2025-06-09 14:59:40 +08:00
# 第一阶段:构建应用
FROM node:20 as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# 第二阶段:运行应用
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 48100
CMD ["nginx", "-g", "daemon off;"]