vouch-proxy icon indicating copy to clipboard operation
vouch-proxy copied to clipboard

docker build fails with golang image version `golang:1.18`

Open nilskch opened this issue 1 year ago • 4 comments

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.

nilskch avatar Apr 09 '23 06:04 nilskch

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

blalop avatar Apr 26 '23 09:04 blalop

Also running into this when compiling from source & running binary.

wrongecho avatar May 21 '23 07:05 wrongecho

./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

OLamothePenelle avatar Jun 07 '23 01:06 OLamothePenelle

i had the same issue when compiling from source with the Dockerfile & docker compose. Upgrading to go 1.20 fixed it for me.

Shadetheartist avatar Jun 30 '23 19:06 Shadetheartist