ci: enable BuildKit (DOCKER_BUILDKIT=1) so Dockerfile cache mounts build
Build and Push Docker Image / build (push) Failing after 3s
Build and Push Docker Image / build (push) Failing after 3s
The legacy builder ignores '# syntax=docker/dockerfile:1.7' and fails at the first 'RUN --mount=type=cache' in the deps stage, which is why runs #193, #382 and #433 all died in ~3s at Step 5/38. Activating dockerd's integrated BuildKit backend fixes the build so :latest publishes again.
This commit is contained in:
@@ -25,6 +25,13 @@ jobs:
|
|||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Build and Push
|
- name: Build and Push
|
||||||
|
env:
|
||||||
|
# This Dockerfile uses BuildKit features (`# syntax=docker/dockerfile:1.7`
|
||||||
|
# and `RUN --mount=type=cache`). Without this the CLI falls back to the
|
||||||
|
# legacy builder, which ignores the syntax directive and fails at the first
|
||||||
|
# `--mount`. DOCKER_BUILDKIT=1 activates dockerd's integrated BuildKit
|
||||||
|
# backend (no separate buildx plugin required).
|
||||||
|
DOCKER_BUILDKIT: "1"
|
||||||
run: |
|
run: |
|
||||||
IMAGE="registry.alwisp.com/${{ gitea.repository }}"
|
IMAGE="registry.alwisp.com/${{ gitea.repository }}"
|
||||||
GIT_SHA="$(git rev-parse --short HEAD)"
|
GIT_SHA="$(git rev-parse --short HEAD)"
|
||||||
|
|||||||
Reference in New Issue
Block a user