title: Jenkins Docker Container can't access docker.sock
body: <p>I deployed the standard Jenkins Docker image with docker-compose and this configuration:</p>
  
  <pre><code>deployer:
    image: jenkins
    volumes:
      - "/mnt/jenkins:/var/jenkins_home"
      - "/var/run/docker.sock:/var/run/docker.sock"
    ports:
      - "2375:2375"
      - "8080:8080"
      - "50000:50000"
  </code></pre>
  
  <p>After reading numerous SO questions I tested added Root to the docker user group with <code>gpasswd -a ${USER} docker</code> and verified that the user inside the Container is Root with <code>docker exec jenkins_deployer echo ${USER}</code>.</p>
  
  <p>When I try to add Docker access inside the Jenkins UI with "Docker URL = unix:///var/run/docker.sock" I get the error message
  "<strong>org.newsclub.net.unix.AFUNIXSocketException: Permission denied (socket: /run/docker.sock)</strong>"</p>
  
  <p>How can I give Jenkins access to docker.sock to automatically deploy Docker Containers?</p>