Hello.
I am facing issue with docker socket:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I have my drone setup on k8s with 2 pods → server and agent.
My builds are ran in parallel.
server conf:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: server
namespace: droneci
spec:
replicas: 1
template:
metadata:
labels:
name: server
spec:
containers:
- name: server
image: drone/drone:1
imagePullPolicy: Always
env:
- name: DRONE_SERVER_HOST
value: “hidden”
- name: DRONE_SERVER_PROTO
value: “http”
- name: “DRONE_OPEN”
value: “true”
- name: “DRONE_USER_CREATE”
value: “hidden”
- name: “DRONE_RPC_SECRET”
value: hidden
- name: “DRONE_PROVIDER”
value: “bitbucket”
- name: “DRONE_BITBUCKET”
value: “true”
- name: “DRONE_BITBUCKET_CLIENT_ID”
value: “hidden”
- name: “DRONE_BITBUCKET_CLIENT_SECRET”
value: “hidden”
- name: “DRONE_DATABASE_DRIVER”
value: “hidden”
- name: “DRONE_DATABASE_DATASOURCE”
value: “*****”
- name: “DRONE_LOGS_DEBUG”
value: “true”
- name: “DRONE_AGENTS_ENABLED”
value: “true”
agent conf:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: agent
namespace: droneci
spec:
replicas: 8
template:
metadata:
labels:
name: agent
spec:
containers:
- name: agent
image: drone/agent:latest
imagePullPolicy: Always
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-socket
env:
- name: “DRONE_RPC_SERVER”
value: “http://server”
- name: “DRONE_RPC_SECRET”
value: hidden
- name: “DRONE_LOGS_DEBUG”
value: “true”
- name: “DRONE_AGENT_CONCURRENCY”
value: “4”
- name: “DRONE_RUNNER_CAPACITY”
value: “4”
volumes:
- name: docker-socket
hostPath:
path: /var/run/docker.sock
I’ve tried configuration without runner_capacity or agent_concurrency and it still the same…
Except this issue, when all stages are completed, pipeline is still processing something and I need wait at least a few minutes to see completed and passed build.
Thanks for any advice and help.
Michael