ci: build proxy image with ko instead of Docker Buildx #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/proxy-release-ko"
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?
Buildx (kubernetes driver) works but is fiddly to operate. ko is a much
simpler fit for a Go service: it compiles the binary and assembles/pushes
the OCI image via the registry API — no Docker daemon, no buildkit pod,
no privileged/userns access (which is what broke buildah on the runner).
ldflags {{.Env.VERSION}} (matches the Dockerfile, kept for local builds)
go install ko, thenko build --bare --tagsto forge.wynning.tech/james/hugo-ap-comments-proxyVerified locally with ko v0.18.1: --bare --tags produces :X.Y.Z and
:latest, and the embedded version is correct in the built binary.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
Buildx (kubernetes driver) works but is fiddly to operate. ko is a much simpler fit for a Go service: it compiles the binary and assembles/pushes the OCI image via the registry API — no Docker daemon, no buildkit pod, no privileged/userns access (which is what broke buildah on the runner). - proxy/.ko.yaml: distroless nonroot base, version stamped via ldflags {{.Env.VERSION}} (matches the Dockerfile, kept for local builds) - proxy-release.yml: setup-go + `go install ko`, then `ko build --bare --tags` to forge.wynning.tech/james/hugo-ap-comments-proxy - still uses REGISTRY_USERNAME/REGISTRY_TOKEN secrets Verified locally with ko v0.18.1: --bare --tags produces :X.Y.Z and :latest, and the embedded version is correct in the built binary. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>