Closed ejona86 closed 2 years ago
Is there a way to install git
through some GA step. The size difference between the alpine and non-alpine images is huge. Would be great if we can continue to use the alpine image.
It isn't that big of a difference vs normal Alpine. It is 100 vs 300 mb or something instead of the normal very small Alpine. Ideally the containers would be cached, so it is better to use a container that has what we need instead of install on every build. Also, Cloud Build is really not oriented toward installing things on demand.
It isn't that big of a difference vs normal Alpine. It is 100 vs 300 mb
I tried building some docker images:
using scratch
: 6.8 MB
using golang:1.18-alpine
: 335 MB
using golang:1.18
: 970 MB
Also, Cloud Build is really not oriented toward installing things on demand.
Ack
This fixes a regression introduced in 9f045adb that broke the Cloud Build CI:
In Go 1.18 the Go command will invoke the git command to include VCS information inside the binary. We want that functionality, so we don't want to pass
-buildvcs=false
. The non-Alpine container includes the git command.