Fix pipeline: run build job in a container with docker CLI
Some checks failed
Build and push image / build-and-push (push) Failing after 14s

The runner's default job image has no docker binary. Run the job in
docker:27-cli with a docker:27-dind sidecar service instead of relying
on the runner exposing a host docker socket.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Lucas Seidelin Rosenvold Christensen 2026-09-18 15:06:40 +02:00
parent 9072622e4f
commit 340fc8ba57

View file

@ -7,10 +7,17 @@ on:
jobs: jobs:
build-and-push: build-and-push:
# Needs docker-in-docker: the runner's job container must have access to
# a docker socket (e.g. act_runner configured with
# -v /var/run/docker.sock:/var/run/docker.sock) for buildx to work.
runs-on: docker runs-on: docker
# The default job image has no docker CLI, so run in an image that has
# one and talk to a sidecar dind daemon over the network instead of
# relying on the runner exposing a host docker socket.
container: docker:27-cli
services:
docker:
image: docker:27-dind
options: --privileged
env:
DOCKER_HOST: tcp://docker:2375
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4