使用docker compose我启动了一个jenkins容器,我希望能够执行docker命令(在服务器上安装docker)。在jenkins中执行docker命令(在docker容器中)
但是,当我试图做一个简单的测试运行你好世界图像,我有以下错误:
docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.
我设置泊坞窗组的用户,这有什么错我的搬运工撰写的文件吗? 在其他岗位我看看我加入这一行:
/var/run/docker.sock:/var/run/docker.sock
我与詹金斯可以与码头工人沟通容器
我的搬运工撰写文件
jenkins:
image: jenkins:2.32.3
ports:
- 8088:8080
- 50000:50000
volumes:
- /home/my-user-name/docker-jenkins/jenkins_home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker
- /tmp:/tmp