Public | Automated Build

Last pushed: 2 years ago
Short Description
Golang app builder
Full Description

Docker Golang builder

Docker image for building Golang projects, the image is based on CentOS7.

This docker image will produce another docker image, named $DOCKER_IMAGE.


  • Access to Docker daemon socket.
  • Dockerfile, it must be located on the root directory of the project to be built.


$ mkdir -p src/
$ git clone src/

$ docker run --rm -e DOCKER_IMAGE="image-name:latest" \
  -e APP_NAME="app_name" \
  -e APP_VERSION="`git describe --tags" \
  -v "$$PWD/src:/go/src" \
  -v /var/run/docker.sock:/var/run/docker.sock tripledes/centos-golang-builder

Environment variables

  • PROJECT_PATH: Path to the source code, default none
  • APP_NAME: It'll be used for the binary name, default project name
  • DOCKER_IMAGE: Docker image name, default none
  • APP_VERSION: It can be used on the Dockerfile as ARG, e.g. for labels, default none
  • DOCKER_BUILD: Override docker build parameters, default build
  • GO_BUILD: Override go build parameters, default build

Working examples


  • Go 1.6.x
  • Docker 1.11.x
Docker Pull Command
Source Repository