Docker Repository

The standalone binary is available in an official Docker repository: concourse/concourse. There are tags for each version, including release candidates if you want to live on the bleeding edge.

For a quick start with Docker Compose, create docker-compose.yml:

docker-compose.yml

version: '3'

services:
  concourse-db:
    image: postgres:9.5
    environment:
      POSTGRES_DB: concourse
      POSTGRES_USER: concourse
      POSTGRES_PASSWORD: changeme
      PGDATA: /database

  concourse-web:
    image: concourse/concourse
    links: [concourse-db]
    command: web
    depends_on: [concourse-db]
    ports: ["8080:8080"]
    volumes: ["./keys/web:/concourse-keys"]
    environment:
      CONCOURSE_BASIC_AUTH_USERNAME: concourse
      CONCOURSE_BASIC_AUTH_PASSWORD: changeme
      CONCOURSE_EXTERNAL_URL: "${CONCOURSE_EXTERNAL_URL}"
      CONCOURSE_POSTGRES_DATA_SOURCE: |-
        postgres://concourse:changeme@concourse-db:5432/concourse?sslmode=disable

  concourse-worker:
    image: concourse/concourse
    privileged: true
    links: [concourse-web]
    depends_on: [concourse-web]
    command: worker
    volumes: ["./keys/worker:/concourse-keys"]
    environment:
      CONCOURSE_TSA_HOST: concourse-web
      CONCOURSE_GARDEN_DNS_SERVER: 8.8.8.8

Then, run the following to generate the necessary keys:

mkdir -p keys/web keys/worker

ssh-keygen -t rsa -f ./keys/web/tsa_host_key -N ''
ssh-keygen -t rsa -f ./keys/web/session_signing_key -N ''

ssh-keygen -t rsa -f ./keys/worker/worker_key -N ''

cp ./keys/worker/worker_key.pub ./keys/web/authorized_worker_keys
cp ./keys/web/tsa_host_key.pub ./keys/worker

The next thing you'll need is an address that can be used to reach the web node from within your network. This is the $CONCOURSE_EXTERNAL_URL variable. It can't be 127.0.0.1 or localhost as it has to also work in a separate network namespace, for execute to be able to receive your uploaded bits from the web node.

If you're using docker-machine, set CONCOURSE_EXTERNAL_URL to whatever the machine's IP is, for example:

export CONCOURSE_EXTERNAL_URL=http://192.168.99.100:8080

Then, spin everything up:

docker-compose up

Next, browse to your configured external URL (probably 127.0.0.1:8080 or 192.168.99.100:8080) and log in with the username concourse and password changeme.

Given that the Docker repository simply wraps the binary, you'll want to reference the binary documentation or just run docker run concourse/concourse <command> --help if you want to learn how to do any further configuration.

Every flag can also be configured via environment variables in the form of CONCOURSE_(flag), where (flag) is the uppercased flag name with all hyphens conveted to underscores. For example, --basic-auth-username would be CONCOURSE_BASIC_AUTH_USERNAME.

In the above example we've configured basic auth for the main team. For further configuration see Configuring Auth.