I am hoping to transition to Google Cloud Builder for building my project. The project contains numerous Docker images that I want built and pushed to Google Container Registry.
I have a Cobra CLI command that works great on Travis CI that automates linting (golint
and go vet
), formatting (gofmt
), testing (go test
), as well as other things such as automating proto compilation. The command also discovers, builds, and pushes a Docker image for each of the executables (package main
) in the repository (there are many).
I would like to transition to Cloud Builder, but its unclear to me how I would go about calling Docker from the Cobra CLI. The provided go
builder image, gcr.io/cloud-builders/go
, does not have the Docker CLI and the Docker builder image, gcr.io/cloud-builders/docker
seemingly does not have a go
runtime.
Any advice on how to setup a Cloud Builder yaml that would allow me to leverage an authenticated Docker CLI while also providing support for go would be greatly appreciated.