Put GOPATH/bin on PATH so go install-ed tools run #6

Merged
benvin merged 1 commits from container-gopath-bin into main 2026-10-03 00:10:09 +10:00

1 Commits

Author SHA1 Message Date
unkin-agent 9269d71907 Put GOPATH/bin on PATH so go install-ed tools run
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
A step that runs `go install <tool>@<version>` and then invokes the tool fails
with exit 127: the binary lands in $GOPATH/bin, which nothing adds to PATH, and
GOPATH defaults to /root/go. Pipelines moving here from docker.io/golang, where
/go/bin is on PATH, break on that difference.

- Set GOPATH=/go and prepend /go/bin to PATH, matching the official golang images.
- Create /go/bin mode 1777 so go install also works if the image runs as non-root.
- Document the installed-tool contract in the README.
2026-10-03 00:03:17 +10:00