Use runner-provided Docker access for publishing
This commit is contained in:
@@ -49,15 +49,13 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
digest: ${{ steps.build.outputs.digest }}
|
||||
env:
|
||||
# The runner provisions the daemon as "docker-host" (container.options:
|
||||
# --add-host=docker-host:host-gateway), so name it rather than a bridge IP:
|
||||
# 172.17.0.1 was a workaround from when that alias did not reach job containers,
|
||||
# and it stops resolving whenever the daemon moves. Set here at job level so every
|
||||
# step -- including the buildx and build-push JS actions -- inherits it.
|
||||
DOCKER_HOST: tcp://docker-host:2375
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# Docker access belongs to the runner configuration: inherit its socket,
|
||||
# context, or TLS environment instead of forcing the previous runner's TCP endpoint.
|
||||
- name: Check publish job Docker connection
|
||||
timeout-minutes: 1
|
||||
run: docker version
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
|
||||
@@ -79,6 +79,16 @@ to untrusted pull-request jobs. The verify job has no deployment credentials.
|
||||
Action references use upstream version tags; mirror/pin these to reviewed commits
|
||||
under your organization's supply-chain policy before production use.
|
||||
|
||||
The publish job inherits Docker access from the runner configuration and checks
|
||||
`docker version` before setting up Buildx. The runner must provide a usable socket
|
||||
or Docker context/environment inside the **job container**, not just inside the
|
||||
runner pod. The replacement DinD daemon listens on port 2376 and a Unix socket;
|
||||
the previous `tcp://docker-host:2375` workflow override does not apply. For TCP,
|
||||
provide the reachable endpoint and required TLS client certificates through the
|
||||
runner configuration. A successful service-container job proves the runner can
|
||||
reach Docker, but does not prove that the publish job can. Check the connection
|
||||
step's output before diagnosing Buildx or registry credentials.
|
||||
|
||||
Set repository variables:
|
||||
|
||||
| Variable | Example |
|
||||
|
||||
Reference in New Issue
Block a user