From 1107d0410f86c32c363045116bb25905240b9075 Mon Sep 17 00:00:00 2001 From: jason Date: Sun, 19 Jul 2026 14:17:13 -0500 Subject: [PATCH] =?UTF-8?q?fix(ci):=20build=20without=20BuildKit=20?= =?UTF-8?q?=E2=80=94=20runner=20has=20no=20buildx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CI host builds with the legacy Docker builder (buildx/BuildKit missing on the runner). Drop the '# syntax' directive and the 'RUN --mount=type=cache' npm cache mount from the Dockerfile, and remove DOCKER_BUILDKIT=1 from the workflow. Restores a green build so registry.alwisp.com/jason/mrp-qrcode:latest publishes and PORT can roll the container off the pinned old digest. --- .gitea/workflows/docker-build.yml | 9 ++------- Dockerfile | 8 ++++---- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/docker-build.yml b/.gitea/workflows/docker-build.yml index 2847d01..faef7f7 100644 --- a/.gitea/workflows/docker-build.yml +++ b/.gitea/workflows/docker-build.yml @@ -8,6 +8,8 @@ on: jobs: build: # Runs on the forgerunner host: bundled Docker CLI + mounted /var/run/docker.sock. + # The host builds with the legacy Docker builder (buildx/BuildKit is not installed + # on the runner), so the Dockerfile avoids BuildKit-only features. runs-on: host steps: - name: Checkout @@ -25,13 +27,6 @@ jobs: password: ${{ secrets.REGISTRY_TOKEN }} - 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: | IMAGE="registry.alwisp.com/${{ gitea.repository }}" GIT_SHA="$(git rev-parse --short HEAD)" diff --git a/Dockerfile b/Dockerfile index 37d33b5..0ba86bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -# syntax=docker/dockerfile:1.7 - # --- deps ------------------------------------------------------------------ FROM node:20-alpine AS deps WORKDIR /app RUN apk add --no-cache openssl libc6-compat COPY package.json package-lock.json* ./ -RUN --mount=type=cache,target=/root/.npm \ - if [ -f package-lock.json ]; then npm ci; else npm install; fi +# Plain RUN (no BuildKit cache mount): the CI host builds with the legacy Docker +# builder — buildx/BuildKit is not available on the runner — so `--mount=type=cache` +# is not supported here. +RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi # --- build ----------------------------------------------------------------- FROM node:20-alpine AS builder