I deployed a standard Jenkins Docker image using docker-compose and this configuration:
deployer:
image: jenkins
volumes:
- "/mnt/jenkins:/var/jenkins_home"
- "/var/run/docker.sock:/var/run/docker.sock"
ports:
- "2375:2375"
- "8080:8080"
- "50000:50000"
After reading the many SO questions I tested, Root was added to the docker user group with help gpasswd -a ${USER} dockerand confirmed that the user inside the container is root c docker exec jenkins_deployer echo ${USER}.
When I try to add Docker access to the Jenkins user interface using "Docker URL = unix: ///var/run/docker.sock", I get the error message " org.newsclub.net.unix.AFUNIXSocketException: Permission denied (socket : /run/docker.sock) "
How can I give Jenkins access to docker.sock to automatically deploy Docker containers?