Public | Automated Build

Last pushed: 2 years ago
Short Description
gocd-agent all in one. Docker container with maven, ant, nodejs, capybara, and cucumber.
Full Description


This repo contains docker files and required configuration files to build and run gocd server and agent.

gocd-agent includes following:

  • docker client to build and deploy containers.
  • maven, ant, and nodejs.
  • capybara, cucumber, selenium, firefox, and Xvfb.


build a data container for data persistency:

cd gocd-data
docker build -t gocd-data .

create data container:

docker create --name gocd-data gocd-data

Note: No need to run this container.

build and run gocd-server container and load volumes from gocd-data container:

cd gocd-server
docker build -t gocd-server .
docker run -d -t -p 8153:8153 -p 8154:8154 --name gocd-server --volumes-from gocd-data gocd-server


build gocd-agent:

cd gocd-agent
docker build -t gocd-agent .

run as many gocd build agent containers as you like:

docker run -v /var/run/docker.sock:/var/run/docker.sock -d --name <AGENT_NAME> --link gocd-server:go-server gocd-agent

You can run 4 build agents as follows:

docker run -v /var/run/docker.sock:/var/run/docker.sock -d --name gocd-agent1 --link gocd-server:go-server gocd-agent
docker run -v /var/run/docker.sock:/var/run/docker.sock -d --name gocd-agent2 --link gocd-server:go-server gocd-agent
docker run -v /var/run/docker.sock:/var/run/docker.sock -d --name gocd-agent3 --link gocd-server:go-server gocd-agent
docker run -v /var/run/docker.sock:/var/run/docker.sock -d --name gocd-agent4 --link gocd-server:go-server gocd-agent

We expose the docker socket to goCD agent containers, by bind-mounting it with the -v flag.
You can check this post for more information.

Note: Make sure gocd-agent users have read/write permissions to /var/run/docker.sock file.

Docker Pull Command
Source Repository