huangye-parking/admin/Dockerfile
2026-02-28 18:08:44 +08:00

17 lines
323 B
Docker

# 构建阶段
FROM node:20-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
# 运行阶段 - 使用 nginx 托管静态文件
FROM nginx:alpine AS runtime
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80