简体   繁体   English

Jenkins 无法连接到 unix:///var/run/docker.sock 上的 Docker 守护进程。 docker 守护进程是否正在运行?

[英]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.

相关问题 docker中的jenkins-无法通过unix:///var/run/docker.sock连接到Docker守护程序。 泊坞窗守护程序正在运行吗? - jenkins in docker - Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 在 docker 容器上运行 Jenkins。无法连接到 unix:///var/run/docker.sock 上的 Docker 守护进程。 docker 守护进程是否正在运行? - Running Jenkins on docker container.Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? docker compose in bitbucket - 无法连接到 unix:///var/run/docker.sock 上的 Docker 守护进程。 docker 守护进程是否正在运行? - docker compose in bitbucket - Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? macOS - docker:无法连接到 unix:///var/run/docker.sock 的 Docker 守护程序。 docker 守护程序是否正在运行? - macOS - docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? docker:无法连接到unix:///var/run/docker.sock上的Docker守护程序。 docker守护程序是否正在运行? - docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? docker-compose | 无法连接到 unix:///var/run/docker.sock 上的 Docker 守护进程。 docker 守护进程是否正在运行? - docker-compose | Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? docker:无法连接到位于 unix:///var/run/docker.sock 的 Docker 守护进程。 docker 守护程序是否正在运行? - docker:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? "<i>ERROR :Cannot connect to the Docker daemon at unix:\/\/\/var\/run\/docker.sock.<\/i>错误:无法连接到 unix:\/\/\/var\/run\/docker.sock 上的 Docker 守护程序。<\/b> <i>Is the docker daemon running<\/i> docker 守护进程是否正在运行<\/b>" - ERROR :Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running CentOS 7 - 无法连接到 unix:///var/run/docker.sock 处的 Docker 守护程序。 docker 守护程序是否正在运行? - CentOS 7 - Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 如何修复错误“无法连接到 unix:///var/run/docker.sock 的 Docker 守护程序。 docker 守护程序是否正在运行” - How to fix the error “Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM