diff --git a/.project-docs/30-worklog/tasks/20260814-remove-syntax-frontend-1f6c9d3b.md b/.project-docs/30-worklog/tasks/20260814-remove-syntax-frontend-1f6c9d3b.md new file mode 100644 index 0000000..774c575 --- /dev/null +++ b/.project-docs/30-worklog/tasks/20260814-remove-syntax-frontend-1f6c9d3b.md @@ -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. diff --git a/Dockerfile b/Dockerfile index 718f928..e81af4d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,3 @@ -# syntax=docker/dockerfile:1 - FROM node:22-alpine AS deps WORKDIR /app ENV NEXT_TELEMETRY_DISABLED=1 diff --git a/backend/Dockerfile b/backend/Dockerfile index ea947c4..caac47e 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,4 +1,3 @@ -# syntax=docker/dockerfile:1 # Build context: the repository backend/ directory. # docker build -f backend/Dockerfile -t REGISTRY/PROJECT/zhinian-go-api:TAG backend/ # diff --git a/backend/Dockerfile.runtime b/backend/Dockerfile.runtime index 801a7d0..5b6d997 100644 --- a/backend/Dockerfile.runtime +++ b/backend/Dockerfile.runtime @@ -1,4 +1,3 @@ -# syntax=docker/dockerfile:1 # Runtime-only image for build environments whose registry mirror cannot serve # 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: