在docker中搭建Jenkins运行环境后,使用docker命令构建docker镜像,报以下错误
+ docker build -f ../Dockerfile -t 192.168.190.126:5000/aa***:latest . time="2020-08-25T09:39:21Z" level=error msg="failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: permission denied" context canceled
根据报错可以看出是权限不足,到宿主机器下把
/var/run/docker.sock
文件权限设置为777就可以了