Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

gocd-contrib/docker-golang-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-golang-image

A docker image containing a Golang environment for builds

Includes everything needed to build a basic golang project

  • golang
  • git
  • gcc
  • bash

And some some extra utils that are useful:

  • curl
  • zip
  • ssh
  • subversion (some builds need this)

Building the image locally

docker build . --pull --no-cache --platform linux/amd64 -t gocddev/golang-build:SNAPSHOT -f Dockerfile

Running

Start the container with this:

docker run -d -e GO_SERVER_URL=... gocddev/golang-build:SNAPSHOT

Auto-registering the agents

docker run -d \
  -e AGENT_AUTO_REGISTER_KEY=... \
  -e AGENT_AUTO_REGISTER_RESOURCES=... \
  -e AGENT_AUTO_REGISTER_ENVIRONMENTS=... \
  -e AGENT_AUTO_REGISTER_HOSTNAME=... \
  gocddev/golang-build:4.0.0

If the AGENT_AUTO_REGISTER_* variables are provided (we recommend that you do), then the agent will be automatically approved by the server. See the auto registration docs on the GoCD website.

Development

Pushing the built image to Docker Hub for use in build.gocd.org builds under the ecs-golang-build elastic agent profile:

  • Login to Docker hub with an account that has push token/credentials for the gocddev organisation
  • Run
    VERSION=4.0.11
    docker tag gocddev/golang-build:SNAPSHOT gocddev/golang-build:${VERSION}
    docker push gocddev/golang-build:${VERSION}

About

A docker image containing a Golang environment for builds

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors