Having an issue trying to build a container using a K8s Drone setup. Both the Drone master and the Drone runner were installed with Helm charts. I’m able to run jobs, but not able to build containers. I have a pretty simple test:
--- kind: pipeline type: kubernetes name: build and deploy steps: - name: build image: plugins/docker settings: repo: binaryronin/test tags: test username: from_secret: docker_username password: from_secret: docker_secret
But the container fails to build with an error around the docker.sock:
+ /usr/local/bin/dockerd --data-root /var/lib/docker --host=unix:///var/run/docker.sock Detected registry credentials + /usr/local/bin/docker version Client: Docker Engine - Community Version: 19.03.8 API version: 1.40 Go version: go1.12.17 Git commit: afacb8b7f0 Built: Wed Mar 11 01:22:56 2020 OS/Arch: linux/amd64 Experimental: false Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? time="2021-07-18T14:02:24Z" level=fatal msg="exit status 1"
As far as I understand the
plugins/docker container runs a Docker daemon inside the container for the build process, so I’m confused as to why it doesn’t work.
Any help would be appreciated!