Docker Community Forums

Share and learn in the Docker community.

Problem binding docker.sock from ubuntu host in alpine container


(Mandyh) #1

I am running a docker host on Ubuntu 16.04 and am running a container with jenkins:alpine as a base image and installing Docker on top. I am binding my socket using -v /var/run/docker.sock:/var/run/docker.sock.

Problem:
I cannot run docker commands in my container unless I am root. I have added the jenkins user to the docker group on my host. The error I get is

bash-4.3$ docker info
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

What else do I need to do to allow Docker to be run from my Jenkins container as the jenkins user?