Push the image through the Podman socket proxy #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/registry-push"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the image push that PR #2 left broken.
ko built the image fine but could not publish it:
ko talks to the registry from inside the job container, where the public
address resolves but refuses connections — runner and Forgejo sit on the same
host, so the traffic would have to hairpin.
The other repositories on this instance avoid both that problem and the missing
docker CLI the same way:
DOCKER_HOST: tcp://podman-socket-proxy:2375. Login,build and push are then done by the host's daemon, which reaches the registry
without trouble. This PR follows that pattern.
Side effect worth having: ko and .ko.yaml are gone again, so CI and
make docker-buildshare one Dockerfile. The two build paths PR #2 introducedare no longer needed.
The Dockerfile drops the
# syntax=directive and theRUN --mount=type=cachelines — the proxy speaks the Docker API without BuildKit, where both would be
ignored or fail. Verified locally that it still builds and the binary reports
its version.
Also moves the registry login to every branch instead of only where the
push happens. A token with the wrong scope could otherwise not surface before
the merge — the same blind spot that let the last two image failures through.
Proven on this branch: tests green, image builds through the proxy, and the
docker loginwith the configured REGISTRY_TOKEN succeeds. Only the pushitself waits for main, since that is the one thing a branch must not do.