vouch-proxy
vouch-proxy copied to clipboard
docker build fails with golang image version `golang:1.18`
First of all thank you very much for this awesome tool! I created a fork to return customised error html pages (#420) but ran into a problem.
Docker build commands (./do.sh dbuild
and ./do.sh dbuildalpine
) fail with this error message.
The command '/bin/sh -c ./do.sh gobuildstatic # see `do.sh` for vouch-proxy build details
returned a non-zero code: 2
and if you take a look at the logs you can see:
/go/pkg/mod/go.uber.org/[email protected]/error.go:209:20: undefined: atomic.Bool
note: module requires Go 1.19
Changing the image in the Dockerfile
and Dockerfile.alpine
from version golang:1.18
to golang:1.20
fixes the problem.
I am happy to create a PR if you want.
I'm running into the same issue with the bare metal installation, had to upgrade to Go 1.19.
However, I'm not quite sure why this is happening, as the indirect dependency is locked in go.mod: https://github.com/vouch/vouch-proxy/blob/v0.39.0/go.mod#L47
Also running into this when compiling from source & running binary.
./do.sh goget
seems to update go.mod and change the version for atomic and multierr to 1.11.0. My local go.mod file after running goget reads
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
i had the same issue when compiling from source with the Dockerfile & docker compose. Upgrading to go 1.20 fixed it for me.