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

I’m using Jenkins on Docker on my local Mac Machine. And I’m running another Docker on ubuntu VirtualBox. So now, there are 2 docker machines. one is on my mac machine and one is on my Ubuntu VirtualBox machine. I’m running Jenkins on Mac Docker. Now in the Jenkins pipeline, I want to build an image on my ubuntu machine. I’ve configured Jenkins docker cloud and in the docker host URL, it is connected to the ubuntu docker-machine. But while building a new image, I’m getting the error. Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I’ve tried even adding ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock at /lib/systemd/system/docker.service

Can someone help me out? Help is appreciated.

Hi, did you get an answer for that problem? I am also running on Mac and getting the same error

As the error message asks - Is your Docker daemon running?

I am not sure,
I am getting this:

mac-auto-04@mac-auto-04 ~ % docker-machine start  
Error: No machine name(s) specified and no "default" machine exists
mac-auto-04@mac-auto-04 ~ % docker-machine ls
NAME   ACTIVE   DRIVER   STATE   URL   SWARM   DOCKER   ERRORS
mac-auto-04@mac-auto-04 ~ % 

Docker-machine has been deprecated for three years, you sure you want to be using it?

No, I don’t care, what ever works, I just started using docker for a very specific thing.

Thanks for answering!