Dashrath Mundkar
Dashrath Mundkar

Reputation: 9222

How to run docker-in-docker through Jenkins pipeline on Openshift platform?

I am trying to build the docker image in jenkins on openshift platform. But I am getting error like is unix://var/run/docker docker daemon running?

Upvotes: 1

Views: 379

Answers (1)

YK S
YK S

Reputation: 3430

unix://var/run/docker is a Unix domain socket. In Unix it is through sockets that different processes communicate and it is through var/run/docker.sock file that host can communicate to the main docker process.

Now like everything in unix the sockets are also files and thus we can give permissions to a user who can communicate to this file.

In your case your your jenkins user doeesn't have access permissions to this socket file and thus can't communicate to main docker process.

For getting permissions you can do the following as mentioned here:

Create a docker group and add your jenkins user to the docker group.

For more details you can refer to this stackoverflow question

Upvotes: 1

Related Questions