build: drop external Dockerfile frontend to avoid mirror pulls

This commit is contained in:
2026-08-15 13:30:38 +08:00
parent c7d2cb212c
commit ed2ec69628
4 changed files with 36 additions and 4 deletions

View File

@@ -0,0 +1,36 @@
# Task: Drop external Dockerfile frontend to avoid mirror pulls
## Identity
- Task ID: 20260814-remove-syntax-frontend-1f6c9d3b
- Mode: Feature
- Branch: main
- Worktree: /Users/brother7/Documents/AI/NianAIGC
- Base commit: c7d2cb23d0e6866d2cd49e1d1032d90e8cef7863
- Owner: dsh
- Status: Ready for Integration
## Scope
- Fix the CI image build failure where BuildKit tried to pull the `docker/dockerfile:1` frontend image through the broken `registry.docker-cn.com` mirror and timed out before any project step ran.
## Intent And Constraints
- The three Dockerfiles only use built-in frontend features (multi-stage COPY, ARG-before-FROM, RUN/ENV), so removing the `# syntax=` pin loses nothing and skips the external frontend download entirely.
## Outcome
- Removed `# syntax=docker/dockerfile:1` from `Dockerfile`, `backend/Dockerfile`, and `backend/Dockerfile.runtime`.
## Verification
- Static check: no `syntax=docker` directive remains; every Dockerfile still contains a `FROM` line.
- Actual image assembly must run on the build machine; the change removes the failing pull step (the frontend image) from the build graph.
## Follow-ups
- On the CI machine, replace the dead `registry.docker-cn.com` mirror in `/etc/docker/daemon.json` with a live one (e.g. `docker.m.daocloud.io`) and restart Docker; or build via `backend/Dockerfile.runtime` with a prebuilt binary to avoid the golang image as well.
## Promotion Candidates
- None.

View File

@@ -1,5 +1,3 @@
# syntax=docker/dockerfile:1
FROM node:22-alpine AS deps FROM node:22-alpine AS deps
WORKDIR /app WORKDIR /app
ENV NEXT_TELEMETRY_DISABLED=1 ENV NEXT_TELEMETRY_DISABLED=1

View File

@@ -1,4 +1,3 @@
# syntax=docker/dockerfile:1
# Build context: the repository backend/ directory. # Build context: the repository backend/ directory.
# docker build -f backend/Dockerfile -t REGISTRY/PROJECT/zhinian-go-api:TAG backend/ # docker build -f backend/Dockerfile -t REGISTRY/PROJECT/zhinian-go-api:TAG backend/
# #

View File

@@ -1,4 +1,3 @@
# syntax=docker/dockerfile:1
# Runtime-only image for build environments whose registry mirror cannot serve # Runtime-only image for build environments whose registry mirror cannot serve
# the golang builder image. Build the static binary first (any machine with # the golang builder image. Build the static binary first (any machine with
# Go 1.21, no Docker required), then assemble this image from alpine only: # Go 1.21, no Docker required), then assemble this image from alpine only: