[英]Jenkins Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I am building a Docker Image into Jenkinsfile Groovy Script.我正在将 Docker 映像构建到 Jenkinsfile Groovy 脚本中。 I'm facing below error while creating the Docker Image.我在创建 Docker 映像时遇到以下错误。
Since ,docker has been installed automatically by Jenkins, so can't start it manually.由于 docker 已经由 Jenkins 自动安装,所以无法手动启动。
any Idea how can i do this by Jenkins by Script or an other around..?任何想法我如何通过 Jenkins 通过脚本或其他方式来做到这一点..?
Are you installing jenkins on windows or linux?你是在windows还是linux上安装jenkins?
If it is linux, you need to add user jenkins to the docker group如果是linux,需要将用户jenkins加入docker组
usermod -a -G docker jenkins
If it is windows, you need to go to serivces and log on jenkins as administrator.如果是windows,需要去serivces,以管理员身份登录jenkins。
Select tab logon --> Log in with a user with administrator rights选择选项卡登录 --> 使用具有管理员权限的用户登录
Then, restart service jenkins.然后,重新启动服务 jenkins。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.