Build
docker build -t softwarecraftsmen/go-cdserver .
Create network
The go continuous delivery server requires a network for allowing its agents to join.
docker network create go-cd (1)
-
Creates a network of type bridge
Run go with defaults
This runs go with defaults for the server id and agent key.
docker run -tid --name go-cdserver --hostname go-cdserver --net go-cd \ (1)
-p 8153:8153 \ (2)
-p 8154:8154 \ (3)
softwarecraftsmen/go-cdserver
-
Container is added to the network
go-cd
-
Expose HTTP port
-
Expose HTTPS port
Run go with SERVER_ID
export SERVER_ID=`uuidgen` (1)
docker run -tid --name go-cdserver --hostname go-cdserver --net go-cd \
-e SERVER_ID=$SERVER_ID (2)
-p 8153:8153 \
-p 8154:8154 \
softwarecraftsmen/go-cdserver
-
Generate a UUID (Mac OSX only!)
-
Assign a new server id
Note
|
Assigning a server id is not necessary as a server id is automatically generated when it is not present! |
AGENT_KEY |
The key used by agents to auto-register |
SERVER_ID |
A unique server id (will be generated if not set). |
The go-cd server needs one or more agents for executing jobs. Look for the agent Docker image.