# Concourse — Container-Native CI/CD with Pipelines as Code > Build reliable CI/CD pipelines with Concourse. Every step runs in an isolated container, pipelines are declarative YAML, and the resource model makes dependencies explicit and reproducible. ## Install Save as a script file and run: # Concourse — Container-Native CI/CD with Pipelines as Code ## Quick Use ```bash # Install with Docker Compose curl -O https://concourse-ci.org/docker-compose.yml docker-compose up -d # Open http://localhost:8080, login with test/test fly -t local login -c http://localhost:8080 -u test -p test fly -t local set-pipeline -p my-pipeline -c pipeline.yml ``` ## Introduction Concourse is an open-source container-native CI/CD system where every task runs in its own OCI container. Pipelines are defined as declarative YAML with a unique resource model that treats every external dependency — git repos, Docker images, S3 buckets — as a versioned resource. This design eliminates hidden state and makes pipelines fully reproducible across environments. ## What Concourse Does - Runs every build step in an isolated OCI container with no shared state between tasks - Defines pipelines as declarative YAML with explicit inputs, outputs, and triggers - Models external dependencies as typed resources with automatic version tracking - Provides a web UI that visualizes pipeline topology and job status in real time - Scales horizontally with worker nodes that register to a central web/scheduler ## Architecture Overview Concourse has three components: the web node (API, scheduler, UI), the database (PostgreSQL), and worker nodes that execute containers via containerd or Garden. The scheduler watches resources for new versions and triggers jobs when inputs change. Each job's plan is a DAG of tasks, gets, and puts. Workers pull container images, mount input artifacts, run the task script, and push outputs back. All state lives in PostgreSQL — workers are stateless and replaceable. ## Self-Hosting & Configuration - Deploy with Docker Compose for single-node or Helm chart for Kubernetes clusters - Configure `CONCOURSE_EXTERNAL_URL` and PostgreSQL connection via environment variables - Add workers by running `concourse worker` pointed at the web node's TSA port - Use `fly` CLI to set pipelines, trigger builds, intercept containers for debugging - Store secrets in Vault, AWS SSM, or CredHub with built-in credential manager support ## Key Features - Hermetic builds: every task starts from a clean container with declared inputs only - Resource model turns git commits, Docker tags, and S3 objects into first-class pipeline triggers - Pipeline visualization shows dependency flow, making bottlenecks visible at a glance - `fly intercept` lets you SSH into a running or failed task container for debugging - Stateless workers can be autoscaled; all persistent state lives in PostgreSQL ## Comparison with Similar Tools - **Jenkins** — plugin-heavy with mutable agents; Concourse is container-native and stateless - **GitHub Actions** — SaaS-hosted, simpler YAML; Concourse offers deeper reproducibility - **Tekton** — Kubernetes-native; Concourse runs anywhere with Docker, not just K8s - **Drone** — simpler container CI; Concourse's resource model handles complex dependency graphs ## FAQ **Q: Does Concourse require Kubernetes?** A: No. Concourse runs on bare Docker hosts, VMs, or Kubernetes. Workers only need containerd or Garden. **Q: How does the resource model work?** A: A resource type defines how to check, get, and put versions of an external thing. For example, the git resource checks for new commits, gets clones the repo, and put pushes commits. **Q: Can Concourse handle monorepo pipelines?** A: Yes. Use path filters on git resources or the `across` step modifier to fan out jobs per subdirectory. **Q: How does Concourse compare in speed?** A: Container startup adds 2-5 seconds per task, but parallelism and caching (via resource caches) keep overall pipeline times competitive. ## Sources - https://github.com/concourse/concourse - https://concourse-ci.org/docs.html --- Source: https://tokrepo.com/en/workflows/8c85c9b7-3939-11f1-9bc6-00163e2b0d79 Author: Script Depot