chore: 完善全栈 Docker 开发环境与容器基础设施

This commit is contained in:
2026-08-04 17:09:30 +08:00
parent 9ec4f8efa7
commit e0bd1ad44e
3 changed files with 97 additions and 5 deletions

13
frontend/Dockerfile.dev Normal file
View File

@ -0,0 +1,13 @@
# ============================================================
# 前端开发 Dockerfile — Vite + React HMR 热更新
# ============================================================
FROM node:20-alpine
WORKDIR /app
# 先装依赖(利用 Docker 缓存层)
COPY package.json package-lock.json ./
RUN npm install
# 代码通过 docker-compose volumes 挂载
CMD ["npx", "vite", "--host", "0.0.0.0"]