I have been searching for a solution but without any luck.
I want to use a Jenkins container for a series of docker-related jobs. For that, I am trying to mount the docker socket into my container.
I successfully manage to start my jenkins container with the following params:
docker run --name jenkins --privileged=true -t -i --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):/bin/docker -p 8080:8080 jenkins
the docker command is detected successfully. However, when I try a simple command inside the container like
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:19:00 UTC 2015
Get http:///var/run/docker.sock/v1.20/version: dial unix /var/run/docker.sock: permission denied.
- Are you trying to connect to a TLS-enabled daemon without TLS?
- Is your docker daemon up and running?
What am I missing? I have added the jenkins user to the docker group.