Unable to run dockerd under circleci/golang:1.9

According to this Docker there should be latest docker utils. I’ve some tests written using GitHub - ory/dockertest: Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work., but I’m unable to run them as dockerd is not running.

When trying to run it manually using

sudo dockerd

I got following error:

INFO[2017-12-30T19:19:09.746833106Z] libcontainerd: started new docker-containerd process pid=1297
INFO[0000] starting containerd module=containerd revision=89623f28b87a6004d4b785663257362d1658a729 version=v1.0.0
INFO[0000] setting subreaper… module=containerd
INFO[0000] changing OOM score to -500 module=containerd
INFO[0000] loading plugin “io.containerd.content.v1.content”… module=containerd type=io.containerd.content.v1
INFO[0000] loading plugin “io.containerd.snapshotter.v1.btrfs”… module=containerd type=io.containerd.snapshotter.v1
WARN[0000] failed to load plugin io.containerd.snapshotter.v1.btrfs error=“path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter” module=containerd
INFO[0000] loading plugin “io.containerd.snapshotter.v1.overlayfs”… module=containerd type=io.containerd.snapshotter.v1
INFO[0000] loading plugin “io.containerd.metadata.v1.bolt”… module=containerd type=io.containerd.metadata.v1
WARN[0000] could not use snapshotter btrfs in metadata plugin error=“path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter” module=“containerd/io.containerd.metadata.v1.bolt”
INFO[0000] loading plugin “io.containerd.differ.v1.walking”… module=containerd type=io.containerd.differ.v1
INFO[0000] loading plugin “io.containerd.gc.v1.scheduler”… module=containerd type=io.containerd.gc.v1
INFO[0000] loading plugin “io.containerd.grpc.v1.containers”… module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin “io.containerd.grpc.v1.content”… module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin “io.containerd.grpc.v1.diff”… module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin “io.containerd.grpc.v1.events”… module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin “io.containerd.grpc.v1.healthcheck”… module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin “io.containerd.grpc.v1.images”… module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin “io.containerd.grpc.v1.leases”… module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin “io.containerd.grpc.v1.namespaces”… module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin “io.containerd.grpc.v1.snapshots”… module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin “io.containerd.monitor.v1.cgroups”… module=containerd type=io.containerd.monitor.v1
INFO[0000] loading plugin “io.containerd.runtime.v1.linux”… module=containerd type=io.containerd.runtime.v1
INFO[0000] loading plugin “io.containerd.grpc.v1.tasks”… module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin “io.containerd.grpc.v1.version”… module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin “io.containerd.grpc.v1.introspection”… module=containerd type=io.containerd.grpc.v1
INFO[0000] serving… address=“/var/run/docker/containerd/docker-containerd-debug.sock” module=“containerd/debug”
INFO[0000] serving… address=“/var/run/docker/containerd/docker-containerd.sock” module=“containerd/grpc”
INFO[0000] containerd successfully booted in 0.004339s module=containerd
Error starting daemon: couldn’t create plugin manager: error setting plugin manager root to private: permission denied

Not sure whether it’s a bug, but I was expecting to use docker (inside docker…) out of the box and run the deamon e.g. using

service docker start

which does not work.

Many thanks for your help and suggestions.

You cannot run Docker in Docker on CircleCI by default. If you need to run docker commands you should either use the remote docker engine or the machine executor.

Thank you, I didn’t know that. Machine executor solved this issue for me.

1 Like