Go binary builders, targeting specific platforms
1.4K
These image definitions create build images for our Golang binaries.
These images authenticate with GitHub (for private libraries/dependencies) with Github developer tokens. Older images used SSH Keys (copied in from a volume mount) but this has been removed in these new images.
This is a finished container image, and does not need to be built using docker build. Usage for this is to run the container, to generate a go binary.
For example, we have a go application in our current working directory. We would run the following command to create the binary (for use on an alpine 3.10 container):
docker run
--rm \ # Remove container afer build complete
-v "${PWD}":/app \ # Mount working directory read/write
-e "GITHUB_TOKEN=${GITHUB_TOKEN}" \ # Pass in Github token (for private github dependencies)
divido/go-build:1.13-alpine3.10 \ # Build container, in this case uses Go 1.13 on an alpine 3.10 OS
go build -o consumer \ # Our go specific build command (creates binary called consumer in working dir)
Content type
Image
Digest
Size
196.8 MB
Last updated
over 6 years ago
docker pull divido/go-build:1.14-alpine3.11