From 3d38240b2f163ccbda5272bd293bdc42ed6e53bd Mon Sep 17 00:00:00 2001 From: Jason Ross Date: Sat, 10 Oct 2026 15:01:26 +0700 Subject: [PATCH] image build: enable BuildKit The first image build failed in build-gitea: the --chmod option requires BuildKit Both Dockerfiles declare `# syntax=docker/dockerfile:1` and use `COPY --chmod`, but gcr.io/cloud-builders/docker runs the legacy builder unless DOCKER_BUILDKIT=1 is set. The image ships the buildx plugin, so setting it on the two build steps is all that is needed. Co-Authored-By: Claude Opus 5.5 --- cloudbuild/image.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cloudbuild/image.yaml b/cloudbuild/image.yaml index 19369c3..2cc4bf6 100644 --- a/cloudbuild/image.yaml +++ b/cloudbuild/image.yaml @@ -36,6 +36,9 @@ steps: - id: build-gitea name: gcr.io/cloud-builders/docker + # Both Dockerfiles are written for BuildKit (`# syntax=`, COPY --chmod). This + # builder image defaults to the legacy builder, which rejects --chmod. + env: [DOCKER_BUILDKIT=1] entrypoint: bash args: - -c @@ -52,6 +55,7 @@ steps: - id: build-caddy name: gcr.io/cloud-builders/docker + env: [DOCKER_BUILDKIT=1] entrypoint: bash # xcaddy runs inside the Dockerfile's golang builder stage, so the plain # docker builder is all this step needs -- no Go toolchain out here.