fix: use Harbor base images for CI builds

Docker Hub unreachable from k3s cluster. Switch Dockerfile to pull
node and nginx base images from Harbor registry.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Chever John 2026-06-17 10:17:38 +08:00
parent 792ffadfb2
commit 5591c705de
No known key found for this signature in database
GPG Key ID: 2894D52ED1211DF0

View File

@ -1,11 +1,12 @@
FROM node:20-alpine AS builder ARG BASE_REGISTRY=harbor-in-k3s.cheverjohn.me/library
FROM ${BASE_REGISTRY}/node:20-alpine AS builder
WORKDIR /app WORKDIR /app
COPY package.json package-lock.json ./ COPY package.json package-lock.json ./
RUN npm ci RUN npm ci
COPY . . COPY . .
RUN npm run build RUN npm run build
FROM nginx:1.27-alpine FROM ${BASE_REGISTRY}/nginx:1.27-alpine
COPY --from=builder /app/dist /usr/share/nginx/html COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 3015 EXPOSE 3015
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]