Docker-compose inside Concourse 5 no longer working

We have a pipeline using amidos/dcind to run e2e tests in Concourse 4.

Unfortunately since the update to Concourse 5, the task fails with the following error message (the messages before are just the commands being executed in the shell):

+ source /docker-lib.sh
+ start_docker
+ mkdir -p /var/log
+ mkdir -p /var/run
+ sanitize_cgroups
+ mkdir -p /sys/fs/cgroup
+ mountpoint -q /sys/fs/cgroup
+ mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup
+ mount -o remount,rw /sys/fs/cgroup
mount: can't find /sys/fs/cgroup in /proc/mounts

To me it is obvious that we are missing /sys/fs/cgroup inside the container. And yes: the task is marked with privileged: true.

Does anybody have experience with dind or dcind within Concourse 5?

1 Like

The same happens by the way when I use karlkfi/concourse-dcind:

Successfully pulled karlkfi/concourse-dcind@sha256:e2bf5500e19804f42f0627076083ded9c41d1eca3486b8c7150a0ddde8ee274f.

Setting up Docker environment...
mount: can't find /sys/fs/cgroup in /proc/mounts

I ran into the same problem with concouse 5.0.0 and 5.1.0. All my smoke tests and integration test don’t work any more.

I run my concourse setup by using docker-compose. The worker also has a privileged: true flag set. Could that be part of the issue somehow?

I managed to find a fix :tada: (shortly after writing the first response) thanks to this nice response on GitHub

Apparently the util-linux package was missing. I also patched that in my version but it’s probably smarter to use the upstream by meAmidos.

Thanks for your update.

As it turns out, Concourse is actually doing the same themselves using the concourse/unit image:

There is zero documentation on the image itself, but the source Dockerfile seems to be the following:

I haven’t looked into that yet, but it seems to work just fine in Councourse’s own pipeline.

1 Like