Skip to content

Latest commit

 

History

History
65 lines (45 loc) · 1.96 KB

File metadata and controls

65 lines (45 loc) · 1.96 KB

GoCD Docker Compose Example

A minimal, working GoCD v25.4.0 setup using static XML configuration that runs out of the box.

Quick Start

cd static_config
docker-compose up -d

Access the UI at: http://localhost:8153

The dont-wait-forever pipeline is pre-configured in static_config/config/cruise-config.xml - it runs real Gradle tests from this repo.

Demo Contents

  • GoCD Server v25.4.0: Pre-configured with a real Gradle test pipeline
  • 2 Agents: Alpine-based with OpenJDK 21 pre-installed
  • Static Configuration: Pure XML config - no external repos, no setup scripts
  • Persistent Storage: Volumes retain configuration across restarts

Project Structure

static_config/
├── docker-compose.yaml      # Orchestration - server + 2 agents
├── Dockerfile.agent         # Custom Alpine agent with JDK 21
├── config/
│   └── cruise-config.xml    # Static pipeline configuration
└── .gitignore               # Ignores GoCD-generated files

How It Works

The demo pipeline is defined directly in config/cruise-config.xml. When the server starts, it:

  1. Mounts the config directory into the container
  2. Reads the pipeline configuration
  3. Agents auto-register and connect

No git repositories, no config repos, no setup scripts - just static XML that works.

Common Commands

# View status
docker-compose ps

# Follow logs
docker-compose logs -f

# Stop everything
docker-compose down

# Full restart (clean volumes)
docker-compose down -v && docker-compose up -d

Notes

  • Server: Runs on http://localhost:8153
  • Agent Key: 123456789abcdef (for auto-registration, for demo purposes only)
  • Volumes: godata and gohome persist across restarts
  • JDK: OpenJDK 21 pre-installed on Alpine-based agents