Docker命令与Jenkins用户一起在控制台中运行,但不在管道中运行

时间:2019-06-26 21:39:29

标签: docker jenkins

Docker命令与Jenkins用户一起在控制台中运行,但不在管道中

我在ubuntu 14.04中有一个Jenkins,我将Docker作为服务安装,并使用sudo usermod -a -G docker jenkins命令将Jenkins用户添加到docker组,一切都很好,我在控制台中运行了docker命令,但是当我在管道中运行docker命令时,它说: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.38/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=csxn4dmmf5v1ex0s7f83bhr62&shmsize=0&t=192.168.0.1%3A5000%2Fgo-app%3A14&target=&ulimits=null&version=1: dial unix /var/run/docker.sock: connect: permission denied

当我以id运行时,它说: uid = 107(詹金斯)gid = 113(詹金斯)组= 113(詹金斯),998(码头工人) 完全没问题,但是当我运行id whitin管道时,它说 uid = 107(jenkins)gid = 113(jenkins)组= 113(jenkins)

0 个答案:

没有答案