Skip to content
Docker image with Docker Compose. Useful as a base image for integration tests in Concourse CI.
Branch: master
Clone or download
meAmidos Merge pull request #12 from stefanwork/master
Fix "mount: can't find /sys/fs/cgroup in /proc/mounts" error in Concourse 5.0.0
Latest commit c1bf539 Mar 20, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
example Rollback some changes from josebarn/dcind before merging Oct 20, 2017
Dockerfile Install util-linux to fix "mount: can't find /sys/fs/cgroup in /proc/… Mar 20, 2019
LICENSE Minor updates in the README Oct 18, 2017 updating docker daemon start re: concourse/concourse#1351 Oct 18, 2017

dcind (Docker-Compose-in-Docker)

Use this Dockerfile to build a base image for your integration tests in Concourse CI. Alternatively, you can use a ready-to-use image from the Docker Hub: amidos/dcind. The image is Alpine based.

Here is an example of a Concourse job that uses amidos/dcind 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.

  - name: integration
      - aggregate:
        - get: code
          params: {depth: 1}
          passed: [unit-tests]
          trigger: true
        - get: redis
          params: {save: true}
        - get: busybox
          params: {save: true}
      - task: Run integration tests
        privileged: true
          platform: linux
            type: docker-image
              repository: amidos/dcind
            - name: code
            - name: redis
            - name: busybox
            path: sh
              - -exc
              - |
                source /

                # Strictly speaking, preloading of Docker images is not required.
                # However, you might want to do this for a couple of reasons:
                # - If the image comes from a private repository, it is much easier to let Concourse pull it,
                #   and then pass it through to the task.
                # - When the image is passed to the task, Concourse can often get the image from its cache.
                docker load -i redis/image
                docker tag "$(cat redis/image-id)" "$(cat redis/repository):$(cat redis/tag)"

                docker load -i busybox/image
                docker tag "$(cat busybox/image-id)" "$(cat busybox/repository):$(cat busybox/tag)"

                # This is just to visually check in the log that images have been loaded successfully
                docker images

                # Run the container with tests and its dependencies.
                docker-compose -f code/example/integration.yml run tests

                # Cleanup.
                # Not sure if this is required.
                # It's quite possible that Concourse is smart enough to clean up the Docker mess itself.
                docker-compose -f code/example/integration.yml down
                docker volume rm $(docker volume ls -q)

You can’t perform that action at this time.