Docker 构建加固:npm ci + 依赖自检;新增预构建 Dockerfile 与 dist 产物

This commit is contained in:
kimi-agent
2026-08-06 02:56:42 +00:00
parent a670f41c16
commit 0317469ed1
6 changed files with 4313 additions and 2 deletions
+9
View File
@@ -0,0 +1,9 @@
# 预构建部署:不跑 npm,直接把仓库里已构建好的 dist/ 交给 Nginx
# 适合 npm 安装受限的网络环境。用法:
# docker build -f Dockerfile.prebuilt -t buzhou .
FROM nginx:1.27-alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]