front/Dockerfile.k3s
xiaolipro 1bb693433a
Some checks failed
Build and Deploy Front / deploy (push) Failing after 25s
feat:registry
2026-09-07 10:49:46 +08:00

15 lines
569 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.

# k3s / Kaniko:静态 SPA(方案 A)。API 直连 api.ideship.com,镜像内 nginx 不做反代
# 基础镜像走 DaoCloud 代理,避免 Kaniko 直连 docker.io 超时
FROM docker.m.daocloud.io/library/node:20-alpine AS build
WORKDIR /app
RUN corepack enable && corepack prepare pnpm@9 --activate
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm run build
FROM docker.m.daocloud.io/library/nginx:1.27-alpine
COPY --from=build /app/dist /usr/share/nginx/html/
COPY nginx-k3s.conf /etc/nginx/conf.d/default.conf
EXPOSE 80