Files
ogame-vue-ts/Dockerfile
coolxitech 9a8d9ff820 fix(docker): 更新Nginx配置文件路径
- 将nginx.conf复制目标从/etc/nginx/nginx.conf改为/etc/nginx/conf.d/default.conf
- 确保Nginx配置能正确加载默认站点配置
- 保持与Alpine版Nginx的目录结构一致
2025-12-14 13:50:48 +08:00

21 lines
532 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM node:latest AS builder
RUN mkdir -p /workspace
WORKDIR /workspace
RUN npm config set registry https://registry.npmmirror.com
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;
RUN pnpm build
# --- 第二阶段Nginx ---
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /workspace/docs /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]