Id希望为用户jenkins添加在此高山映像中使用docker的权限。没有sudo或usermod安装,最好的方法是什么?
$docker build -t jenkins_image .
构建图像$docker run --name docker_jenkins -itd -v /var/run/docker.sock:/var/run/docker.sock -p 1111:8080 -p 50000:50000 jenkins_image
$docker exec -it docker_jenkins bash
$docker info
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/info: dial unix /var/run/docker.sock: connect: permission denied
Dockerfile
FROM jenkinsci/blueocean:latest
user root
RUN curl https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz | tar xvz -C /tmp/ && mv /tmp/docker/docker /usr/bin/docker
user jenkins
我要求我应该
但是