fix: mirror node:20-alpine to Gitea when Docker Hub TLS times out

BuildKit was failing on registry-1.docker.io even when a local base
image existed. CI now prefers a Gitea-hosted NODE_IMAGE and retries
docker build.
This commit is contained in:
2026-09-05 19:12:37 +03:30
parent 663eafa3e8
commit c1846f8e22
6 changed files with 175 additions and 35 deletions

View File

@@ -1,5 +1,8 @@
# CI can pass a Gitea-hosted mirror when Docker Hub TLS fails (see ci-resolve-node-image.ps1).
ARG NODE_IMAGE=node:20-alpine
# Build stage — produces `.next/standalone` (see next.config.ts output: standalone)
FROM node:20-alpine AS builder
FROM ${NODE_IMAGE} AS builder
WORKDIR /app
@@ -32,7 +35,7 @@ ENV NEXT_PUBLIC_SENTRY_ENVIRONMENT=${NEXT_PUBLIC_SENTRY_ENVIRONMENT}
RUN npm run build
# Production — minimal runtime using Next.js standalone bundle
FROM node:20-alpine AS runner
FROM ${NODE_IMAGE} AS runner
RUN apk add --no-cache dumb-init