[英]Is there any configuration to run docker inside a jenkins container?
I am trying to build an image with docker and then upload it to the docker hub, after passing the quality tests I receive the following error: docker: not found, how can I communicate my docker service (localhost) with the container of jenkins. I am trying to build an image with docker and then upload it to the docker hub, after passing the quality tests I receive the following error: docker: not found, how can I communicate my docker service (localhost) with the container of jenkins.
Important: I have docker desktop installed locally and I have installed jenkins in a local container also in windows 10 pro.重要提示:我在本地安装了 docker 桌面,并且在 windows 10 pro 的本地容器中安装了 jenkins。
Error: https://imgur.com/q1SrKGe Pipeline: https://imgur.com/nQWL1HR错误: https://imgur.com/q1SrKGe管道: https://imgur.com/nQWL1HR
You have 2 options to do this:您有 2 个选项可以执行此操作:
/var/run/docker.sock
, so the bind mount would look like -v /var/run/docker.sock:/var/run/docker.sock
.在 Linux 上,这个套接字是/var/run/docker.sock
,所以绑定挂载看起来像-v /var/run/docker.sock:/var/run/docker.sock
。Building Image
Stage where you have docker installed.为安装了 docker 的Building Image
Stage 使用不同的从代理。 For eg you could use Docker-in-Docker ( https://hub.docker.com/_/docker ) as a Slave Agent for Jenkins (connected via ssh) and run your docker build inside this slave agent. For eg you could use Docker-in-Docker ( https://hub.docker.com/_/docker ) as a Slave Agent for Jenkins (connected via ssh) and run your docker build inside this slave agent.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.