From 5969123c2eeb7daaf1195009c9d436ef1b1a6c97 Mon Sep 17 00:00:00 2001 From: Ondrej Belusky Date: Tue, 1 Sep 2026 13:12:43 +0200 Subject: [PATCH] fix: buildkitd network + TCP listener for remote driver Two bugs made the first CI run fail with 'waiting for connection: context deadline exceeded': 1. Container started without --network landed on default bridge, while job containers run on git_default -> name unresolvable, bridge IP unreachable cross-network. 2. moby/buildkit default entrypoint only listens on a unix socket. driver: remote needs TCP. Added --addr tcp://0.0.0.0:8375 and changed endpoint from docker-container://name (only valid for the docker-container driver) to tcp://name:8375. Both verified on the oracle host: buildx remote driver connects, Status running, platforms linux/arm64,v7,v6. --- action.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 25ba7f6..6f3bb93 100644 --- a/action.yml +++ b/action.yml @@ -21,6 +21,14 @@ inputs: description: 'Stop the buildkitd container after the job (idle cleanup; container restarts on demand on the next run)' required: false default: 'true' + network: + description: 'Docker network for the buildkitd container — MUST match the network the job containers run on, otherwise the name is unresolvable' + required: false + default: 'git_default' + port: + description: 'TCP port buildkitd listens on' + required: false + default: '8375' runs: using: 'composite' @@ -30,16 +38,17 @@ runs: run: | docker ps -a --format '{{.Names}}' | grep -qx '${{ inputs.container_name }}' || \ docker run -d --name ${{ inputs.container_name }} --privileged \ + --network ${{ inputs.network }} \ --restart unless-stopped \ --label com.centurylinklabs.watchtower.monitor-only=${{ inputs.monitor_only }} \ --label dockhand.notify=${{ inputs.dockhand_notify }} \ - ${{ inputs.image }} + ${{ inputs.image }} --addr tcp://0.0.0.0:${{ inputs.port }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 with: driver: remote - endpoint: docker-container://${{ inputs.container_name }} + endpoint: tcp://${{ inputs.container_name }}:${{ inputs.port }} - name: Stop BuildKit (idle cleanup) if: ${{ inputs.cleanup == 'true' && always() }}