Problem running DinD build

latest: Pulling from plugins/docker

Digest: sha256:c18fffdef41d0436b0b5d95ab17755a157a441dcf1de08395a043cebd0ba5730

Status: Image is up to date for plugins/docker:latest

+ /usr/local/bin/dockerd --data-root /var/lib/docker --host=unix:///var/run/docker.sock

time="2021-12-02T21:13:52.686830264Z" level=info msg="Starting up"

time="2021-12-02T21:13:52.688068784Z" level=warning msg="Error while setting daemon root propagation, this is not generally critical but may cause some functionality to not work or fallback to less desirable behavior" dir=/var/lib/docker error="could not setup daemon root propagation to shared: remount /var/lib/docker, flags: 0x100000: operation not permitted"

time="2021-12-02T21:13:52.692584024Z" level=warning msg="could not change group /var/run/docker.sock to docker: group docker not found"

time="2021-12-02T21:13:52.702642584Z" level=info msg="libcontainerd: started new containerd process" pid=44

time="2021-12-02T21:13:52.703462814Z" level=info msg="parsed scheme: \"unix\"" module=grpc

time="2021-12-02T21:13:52.703579044Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc

time="2021-12-02T21:13:52.704311694Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc

time="2021-12-02T21:13:52.704478914Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc

time="2021-12-02T21:13:52.776668235Z" level=info msg="starting containerd" revision=5b46e404f6b9f661a205e28d59c982d3634148f8 version=v1.4.11

time="2021-12-02T21:13:52.809471206Z" level=info msg="loading plugin \"io.containerd.content.v1.content\"..." type=io.containerd.content.v1

time="2021-12-02T21:13:52.809936146Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.aufs\"..." type=io.containerd.snapshotter.v1

time="2021-12-02T21:13:52.815462096Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.aufs\"..." error="aufs is not supported (modprobe aufs failed: exit status 1 \"ip: can't find device 'aufs'\\nmodprobe: can't change directory to '/lib/modules': No such file or directory\\n\"): skip plugin" type=io.containerd.snapshotter.v1

time="2021-12-02T21:13:52.815567896Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.btrfs\"..." type=io.containerd.snapshotter.v1

time="2021-12-02T21:13:52.816216036Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.btrfs\"..." error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs (ext4) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1

time="2021-12-02T21:13:52.816333556Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.devmapper\"..." type=io.containerd.snapshotter.v1

time="2021-12-02T21:13:52.816478906Z" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.devmapper" error="devmapper not configured"

time="2021-12-02T21:13:52.816793716Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.native\"..." type=io.containerd.snapshotter.v1

time="2021-12-02T21:13:52.817042276Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.overlayfs\"..." type=io.containerd.snapshotter.v1

time="2021-12-02T21:13:52.818288746Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.zfs\"..." type=io.containerd.snapshotter.v1

time="2021-12-02T21:13:52.818753766Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.zfs\"..." error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1

time="2021-12-02T21:13:52.818906326Z" level=info msg="loading plugin \"io.containerd.metadata.v1.bolt\"..." type=io.containerd.metadata.v1

time="2021-12-02T21:13:52.819122946Z" level=warning msg="could not use snapshotter devmapper in metadata plugin" error="devmapper not configured"

time="2021-12-02T21:13:52.819307586Z" level=info msg="metadata content store policy set" policy=shared

time="2021-12-02T21:13:52.820258966Z" level=info msg="loading plugin \"io.containerd.differ.v1.walking\"..." type=io.containerd.differ.v1

time="2021-12-02T21:13:52.820437716Z" level=info msg="loading plugin \"io.containerd.gc.v1.scheduler\"..." type=io.containerd.gc.v1

time="2021-12-02T21:13:52.820651716Z" level=info msg="loading plugin \"io.containerd.service.v1.introspection-service\"..." type=io.containerd.service.v1

time="2021-12-02T21:13:52.820808296Z" level=info msg="loading plugin \"io.containerd.service.v1.containers-service\"..." type=io.containerd.service.v1

time="2021-12-02T21:13:52.820984756Z" level=info msg="loading plugin \"io.containerd.service.v1.content-service\"..." type=io.containerd.service.v1

time="2021-12-02T21:13:52.821430336Z" level=info msg="loading plugin \"io.containerd.service.v1.diff-service\"..." type=io.containerd.service.v1

time="2021-12-02T21:13:52.821546946Z" level=info msg="loading plugin \"io.containerd.service.v1.images-service\"..." type=io.containerd.service.v1

time="2021-12-02T21:13:52.821659256Z" level=info msg="loading plugin \"io.containerd.service.v1.leases-service\"..." type=io.containerd.service.v1

time="2021-12-02T21:13:52.822133016Z" level=info msg="loading plugin \"io.containerd.service.v1.namespaces-service\"..." type=io.containerd.service.v1

time="2021-12-02T21:13:52.822212926Z" level=info msg="loading plugin \"io.containerd.service.v1.snapshots-service\"..." type=io.containerd.service.v1

time="2021-12-02T21:13:52.822307246Z" level=info msg="loading plugin \"io.containerd.runtime.v1.linux\"..." type=io.containerd.runtime.v1

time="2021-12-02T21:13:52.822790466Z" level=info msg="loading plugin \"io.containerd.runtime.v2.task\"..." type=io.containerd.runtime.v2

time="2021-12-02T21:13:52.823648076Z" level=info msg="loading plugin \"io.containerd.monitor.v1.cgroups\"..." type=io.containerd.monitor.v1

time="2021-12-02T21:13:52.825188626Z" level=info msg="loading plugin \"io.containerd.service.v1.tasks-service\"..." type=io.containerd.service.v1

time="2021-12-02T21:13:52.825385456Z" level=info msg="loading plugin \"io.containerd.internal.v1.restart\"..." type=io.containerd.internal.v1

time="2021-12-02T21:13:52.825725976Z" level=info msg="loading plugin \"io.containerd.grpc.v1.containers\"..." type=io.containerd.grpc.v1

time="2021-12-02T21:13:52.825855906Z" level=info msg="loading plugin \"io.containerd.grpc.v1.content\"..." type=io.containerd.grpc.v1

time="2021-12-02T21:13:52.826010486Z" level=info msg="loading plugin \"io.containerd.grpc.v1.diff\"..." type=io.containerd.grpc.v1

time="2021-12-02T21:13:52.826078376Z" level=info msg="loading plugin \"io.containerd.grpc.v1.events\"..." type=io.containerd.grpc.v1

time="2021-12-02T21:13:52.826149186Z" level=info msg="loading plugin \"io.containerd.grpc.v1.healthcheck\"..." type=io.containerd.grpc.v1

time="2021-12-02T21:13:52.826218576Z" level=info msg="loading plugin \"io.containerd.grpc.v1.images\"..." type=io.containerd.grpc.v1

time="2021-12-02T21:13:52.826324696Z" level=info msg="loading plugin \"io.containerd.grpc.v1.leases\"..." type=io.containerd.grpc.v1

time="2021-12-02T21:13:52.826401796Z" level=info msg="loading plugin \"io.containerd.grpc.v1.namespaces\"..." type=io.containerd.grpc.v1

time="2021-12-02T21:13:52.826650456Z" level=info msg="loading plugin \"io.containerd.internal.v1.opt\"..." type=io.containerd.internal.v1

time="2021-12-02T21:13:52.828167246Z" level=info msg="loading plugin \"io.containerd.grpc.v1.snapshots\"..." type=io.containerd.grpc.v1

time="2021-12-02T21:13:52.828294096Z" level=info msg="loading plugin \"io.containerd.grpc.v1.tasks\"..." type=io.containerd.grpc.v1

time="2021-12-02T21:13:52.828376906Z" level=info msg="loading plugin \"io.containerd.grpc.v1.version\"..." type=io.containerd.grpc.v1

time="2021-12-02T21:13:52.828464176Z" level=info msg="loading plugin \"io.containerd.grpc.v1.introspection\"..." type=io.containerd.grpc.v1

time="2021-12-02T21:13:52.829628886Z" level=info msg=serving... address=/var/run/docker/containerd/containerd-debug.sock

time="2021-12-02T21:13:52.830607876Z" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock.ttrpc

time="2021-12-02T21:13:52.831173156Z" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock

time="2021-12-02T21:13:52.831342106Z" level=info msg="containerd successfully booted in 0.061915s"

time="2021-12-02T21:13:52.849688776Z" level=info msg="parsed scheme: \"unix\"" module=grpc

time="2021-12-02T21:13:52.849755626Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc

time="2021-12-02T21:13:52.849799636Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc

time="2021-12-02T21:13:52.849919986Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc

time="2021-12-02T21:13:52.853165816Z" level=info msg="parsed scheme: \"unix\"" module=grpc

time="2021-12-02T21:13:52.853241366Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc

time="2021-12-02T21:13:52.853297386Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc

time="2021-12-02T21:13:52.853343436Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc

time="2021-12-02T21:13:52.857527636Z" level=error msg="failed to mount overlay: operation not permitted" storage-driver=overlay2

time="2021-12-02T21:13:52.857744696Z" level=error msg="exec: \"fuse-overlayfs\": executable file not found in $PATH" storage-driver=fuse-overlayfs

time="2021-12-02T21:13:52.864914346Z" level=error msg="AUFS was not found in /proc/filesystems" storage-driver=aufs

time="2021-12-02T21:13:52.866225506Z" level=error msg="failed to mount overlay: operation not permitted" storage-driver=overlay

time="2021-12-02T21:13:52.866297186Z" level=error msg="Failed to built-in GetDriver graph devicemapper /var/lib/docker"

time="2021-12-02T21:13:52.866563226Z" level=warning msg="Unable to setup quota: operation not permitted\n"

time="2021-12-02T21:13:52.983973348Z" level=warning msg="Your kernel does not support CPU realtime scheduler"

time="2021-12-02T21:13:52.984063178Z" level=warning msg="Your kernel does not support cgroup blkio weight"

time="2021-12-02T21:13:52.984105478Z" level=warning msg="Your kernel does not support cgroup blkio weight_device"

time="2021-12-02T21:13:52.984679268Z" level=info msg="Loading containers: start."

time="2021-12-02T21:13:52.990918738Z" level=warning msg="Running iptables --wait -t nat -L -n failed with message: `iptables v1.8.7 (legacy): can't initialize iptables table `nat': Permission denied (you must be root)\nPerhaps iptables or your kernel needs to be upgraded.`, error: exit status 3"

time="2021-12-02T21:13:53.029193358Z" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=moby

time="2021-12-02T21:13:53.030605268Z" level=info msg="stopping healthcheck following graceful shutdown" module=libcontainerd

time="2021-12-02T21:13:53.030637378Z" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby

failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.8.7 (legacy): can't initialize iptables table `nat': Permission denied (you must be root)

Perhaps iptables or your kernel needs to be upgraded.

 (exit status 3)

Unable to reach Docker Daemon after 15 attempts.

Registry credentials or Docker config not provided. Guest mode enabled.

+ /usr/local/bin/docker version

Client:

 Version:           20.10.9

 API version:       1.41

 Go version:        go1.16.8

 Git commit:        c2ea9bc

 Built:             Mon Oct  4 16:03:22 2021

 OS/Arch:           linux/amd64

 Context:           default

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

 Experimental:      true

exit status 1

I pasted all the logs for context.
Here’s my conf:


  drone-runner-docker:
    container_name: drone-runner-docker
    image: drone/drone-runner-docker:1
    privileged: true
    ports:
      - 127.0.0.1:3008:3000
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    restart: always
    env_file:
      - /etc/drone/runner.env

My env file:

DRONE_RPC_SECRET=xxxxxxxxxx
DRONE_RPC_HOST=xxxxxxxx
DRONE_RPC_PROTO=https
DRONE_RUNNER_CAPACITY=2
DRONE_RUNNER_NAME=drone-docker-runner

see https://docs.drone.io/plugins/popular/docker/#docker-in-docker-issues

Yes, I was on that page and enabled debug: true.

It appears that my /var/run/docker.sock is not mounting. But I have spent a day and a half trying to figure out why. Is there a clue in the logs I’m not seeing?

Haha figures as soon as I posted I fixed it.

privileged: true on the inner container fixed it.