Skip to content

Latest commit

 

History

History
60 lines (48 loc) · 2.2 KB

README.md

File metadata and controls

60 lines (48 loc) · 2.2 KB

Concourse Docker-Compose-in-Docker

Optimized for use with Concourse CI.

The image is Alpine based, and includes Docker, Docker Compose, and Docker Squash, as well as Bash, maven and openJDK11.

Image published to Docker Hub: andibraeu/concourse-dcind-maven.

Inspired by meAmidos/dcind, concourse/docker-image-resource, karkkfi/concourse-dcind, and mesosphere/mesos-slave-dind.

Features

Unlike meAmidos/dcind, this image...

  • Does not require the user to manually start docker.
  • Uses errexit, pipefail, and nounset.
  • Configures timeout (DOCKERD_TIMEOUT) on dockerd start to account for mis-configuration (docker log will be output).
  • Accepts arbitrary dockerd arguments via optional DOCKER_OPTS environment variable.
  • Passes through --garden-mtu from the parent Gardian container if --mtu is not specified in DOCKER_OPTS.
  • Sets --data-root /scratch/docker to bypass the graph filesystem if --data-root is not specified in DOCKER_OPTS.

Build

docker build -t andibraeu/concourse-dcind-maven .

Example

Here is an example of a Concourse job that uses andibraeu/concourse-dcind-maven image to run a bunch of containers in a task, and then runs the integration test suite. You can find a full version of this example in the example directory.

jobs:
- name: integration
  plan:
  - get: code
    params:
      depth: 1
    passed:
    - unit-tests
    trigger: true
  - task: integration-tests
    privileged: true
    config:
      platform: linux
      image_resource:
        type: docker-image
        source:
          repository: andibraeu/concourse-dcind-maven
      inputs:
      - name: code
      run:
        path: entrypoint.sh
        args:
        - bash
        - -ceux
        - |
          # build maven project that starts some docker containers during integration tests 
          mvn -f code/pom.xml clean very