Sign inSign up

divido/go-build

By divido

Updated over 6 years ago

Go binary builders, targeting specific platforms

Image
0

1.4K

divido/go-build repository overview

Go Build

These image definitions create build images for our Golang binaries.

Github Authentication

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.

Usage

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)

Tag summary

Content type

Image

Digest

Size

196.8 MB

Last updated

over 6 years ago

docker pull divido/go-build:1.14-alpine3.11