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 <noreply@anthropic.com>
This commit is contained in:
2026-10-10 04:04:18 -05:00
committed by Jason Ross
co-authored by Claude Opus 5.5
parent a1669d6be1
commit 3d38240b2f
+4
View File
@@ -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.