This example runs GoCD server and one agent in Docker.
See Docker installation: Docker
services:
server:
image: gocd/gocd-server:latest
restart: unless-stopped
ports:
- "8153:8153"
- "8154:8154"
agent:
image: gocd/gocd-agent:latest
restart: unless-stopped
environment:
GO_SERVER_URL: https://server:8154/go
depends_on:
- server
Start the stack:
docker compose up -d