0
点赞
收藏
分享

微信扫一扫

docker启动jenkins 报错Got permission denied while trying to connect to the Docker

追风骚年 2022-07-28 阅读 91
  1. 查看宿主机 /var/run/docker.sock
  2. docker启动jenkins 报错Got permission denied while trying to connect to the Docker_重启

  3. 查看docker.sock属组
  4. docker启动jenkins 报错Got permission denied while trying to connect to the Docker_docker_02

cd /var/run
ls -l docker.sock

  1. 记录下组id

docker:x:991:

  1. 使用root进入jenkins容器

docker exec -it -u root fe42624a1ccf bash

  1. 在docker内部创建和docker. sock属组id一致的组

groupadd -g 991 docker

  1. 将jenkins加入docker组

gpasswd -a jenkins docker

  1. 重启jenkins容器

留待后查,同时方便他人



举报

相关推荐

0 条评论