优化 Docker 容器构建流程

This commit is contained in:
2026-03-27 03:22:53 +08:00
parent d9db9332dd
commit d14aa31fea
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,5 @@
.DS_Store .DS_Store
node_modules node_modules
dist dist
/.drone.yml

View File

@ -1,9 +1,12 @@
FROM node:lts-alpine AS runtime FROM node:lts-alpine AS runtime
WORKDIR /app WORKDIR /app
COPY . . COPY package*.json .
RUN npm install RUN npm install
COPY . .
RUN npm run build RUN npm run build
ENV HOST=0.0.0.0 ENV HOST=0.0.0.0