This commit is contained in:
parent
7e917f2804
commit
bbb4ad6bd5
16
Dockerfile
16
Dockerfile
@ -1,3 +1,15 @@
|
|||||||
FROM nexus.zzwb.cc:18444/nginx:1.21-alpine
|
# 构建阶段
|
||||||
COPY dist /usr/share/nginx/html
|
FROM registry.cn-shenzhen.aliyuncs.com/zuoge-proxy/node:20-alpine AS build
|
||||||
|
RUN npm install -g pnpm --registry=https://registry.npmmirror.com
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY package.json pnpm-lock.yaml* ./
|
||||||
|
RUN pnpm install --registry=https://registry.npmmirror.com
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
RUN pnpm build
|
||||||
|
|
||||||
|
# 部署阶段
|
||||||
|
FROM registry.cn-shenzhen.aliyuncs.com/zuoge-proxy/nginx:1.27.3-alpine AS app
|
||||||
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user