dagmawi tadesse
dagmawi tadesse

Reputation: 134

is docker daemon running

I am running jenkins container on kubernetes. for some reason, creating a pipeline that pulls dockerfile from bitbucket and builds an image gives me an error. The pull stage works fine, the problem is building the image. When I start the pipeline, I get an error saying,

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

I read all the answers and suggestions online but none of them helped. I tried setting up the global tools, I even added a mountPath to docker.sock in values.yaml file. Is there anyone who knows how to fix this? Thanks in advance.

Upvotes: 2

Views: 1113

Answers (2)

Wytrzymały Wiktor
Wytrzymały Wiktor

Reputation: 13898

Few options:

  1. Check the ActiveState of Docker and run systemctl start docker if it is in failed state.

  2. Use sudo in case of your current user not having access permissions to communicate with docker daemon.

  3. Run dockerd - the persistent process that manages containers. Docker uses different binaries for the daemon and client.

Please, let me know if that helped.

Upvotes: 0

P Ekambaram
P Ekambaram

Reputation: 17689

it appears like you are running docker commands from jenkins container. ensure that unix:///var/run/docker.sock is mounted as volume inside jenkins container. Then jenkins would be able to use unix socket to communicate with the docker daemon on the bound host

Upvotes: 2

Related Questions