fix: publish buildkitd port to host loopback, endpoint tcp://127.0.0.1
Second failure mode: act_runner executes job steps in executor containers running with network=host (despite container.network config — that only applies to job containers). The buildx CLI therefore resolves tcp://buildkitd:8375 in the HOST namespace, where docker DNS names do not resolve. Fix: publish buildkitd's TCP port to host loopback (-p 127.0.0.1:8375:8375) and use tcp://127.0.0.1:8375 as the endpoint. Works from both host-network executors and job containers; port is not exposed on any external interface. Validated on oracle: buildx remote Status running, platforms linux/arm64,v7,v6.
This commit is contained in:
+2
-1
@@ -39,6 +39,7 @@ runs:
|
|||||||
docker ps -a --format '{{.Names}}' | grep -qx '${{ inputs.container_name }}' || \
|
docker ps -a --format '{{.Names}}' | grep -qx '${{ inputs.container_name }}' || \
|
||||||
docker run -d --name ${{ inputs.container_name }} --privileged \
|
docker run -d --name ${{ inputs.container_name }} --privileged \
|
||||||
--network ${{ inputs.network }} \
|
--network ${{ inputs.network }} \
|
||||||
|
-p 127.0.0.1:${{ inputs.port }}:${{ inputs.port }} \
|
||||||
--restart unless-stopped \
|
--restart unless-stopped \
|
||||||
--label com.centurylinklabs.watchtower.monitor-only=${{ inputs.monitor_only }} \
|
--label com.centurylinklabs.watchtower.monitor-only=${{ inputs.monitor_only }} \
|
||||||
--label dockhand.notify=${{ inputs.dockhand_notify }} \
|
--label dockhand.notify=${{ inputs.dockhand_notify }} \
|
||||||
@@ -48,7 +49,7 @@ runs:
|
|||||||
uses: docker/setup-buildx-action@v4
|
uses: docker/setup-buildx-action@v4
|
||||||
with:
|
with:
|
||||||
driver: remote
|
driver: remote
|
||||||
endpoint: tcp://${{ inputs.container_name }}:${{ inputs.port }}
|
endpoint: tcp://127.0.0.1:${{ inputs.port }}
|
||||||
|
|
||||||
- name: Stop BuildKit (idle cleanup)
|
- name: Stop BuildKit (idle cleanup)
|
||||||
if: ${{ inputs.cleanup == 'true' && always() }}
|
if: ${{ inputs.cleanup == 'true' && always() }}
|
||||||
|
|||||||
Reference in New Issue
Block a user