fix: use container DNS name endpoint, executor runs on same docker network
Root cause of the 'waiting for connection' build failure: the act_runner executor container runs on the same docker network as buildkitd, so its 127.0.0.1 is its own loopback — the host-published port is unreachable from there. Revert to tcp://<name>:<port>; container DNS resolves on the shared network. Drop the now-useless loopback port publish. Verified on host: from a container on that network, endpoint tcp://<name>:8375 -> 'Status: running'; tcp://127.0.0.1:8375 -> 'ERROR: context deadline exceeded' (exact CI symptom).
This commit is contained in:
+4
-2
@@ -41,9 +41,11 @@ runs:
|
||||
# If it is already running with the right config, keep it (warm cache).
|
||||
if [ "$(docker inspect -f '{{.State.Running}}' ${{ inputs.container_name }} 2>/dev/null)" != "true" ]; then
|
||||
docker rm -f ${{ inputs.container_name }} >/dev/null 2>&1 || true
|
||||
# NOTE: no -p publish needed — the job executor itself runs on the
|
||||
# same docker network, so it reaches buildkitd by container DNS name.
|
||||
# (127.0.0.1 inside the executor is its own loopback, NOT the host's.)
|
||||
docker run -d --name ${{ inputs.container_name }} --privileged \
|
||||
--network ${{ inputs.network }} \
|
||||
-p 127.0.0.1:${{ inputs.port }}:${{ inputs.port }} \
|
||||
--restart unless-stopped \
|
||||
--label com.centurylinklabs.watchtower.monitor-only=${{ inputs.monitor_only }} \
|
||||
--label dockhand.notify=${{ inputs.dockhand_notify }} \
|
||||
@@ -54,7 +56,7 @@ runs:
|
||||
uses: docker/setup-buildx-action@v4
|
||||
with:
|
||||
driver: remote
|
||||
endpoint: tcp://127.0.0.1:${{ inputs.port }}
|
||||
endpoint: tcp://${{ inputs.container_name }}:${{ inputs.port }}
|
||||
|
||||
- name: Stop BuildKit (idle cleanup)
|
||||
if: ${{ inputs.cleanup == 'true' && always() }}
|
||||
|
||||
Reference in New Issue
Block a user