Files
ogame-vue-ts/Dockerfile
coolxitech 56d98018e6 build(docker): 更新构建命令使用pnpm build
- 将vite build替换为pnpm build以优化构建流程
- 确保构建过程与项目依赖管理工具一致
2025-12-13 13:30:57 +08:00

24 lines
473 B
Docker

FROM node:latest AS builder
RUN mkdir -p /workspace
WORKDIR /workspace
RUN npm config set registry https://registry.npmmirror.com
RUN cd /workspace
RUN git clone https://github.com/setube/ogame-vue-ts.git
RUN mv ./ogame-vue-ts/* . ; rm -rf ./ogame-vue-ts/
RUN npm install -g pnpm ; pnpm install; pnpm build
FROM nginx:alpine
RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /workspace/docs /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]