【发布时间】:2026-02-07 22:50:01
【问题描述】:
我在 docker 中运行 https://hub.docker.com/r/jenkinsci/blueocean/。尝试在 jenkins 中构建一个 docker 镜像。
但我收到以下错误:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
显然 docker 中的 jenkins 版本无法访问 docker 二进制文件。
我证实了这一点,
docker exec -it db4292380977 bash
docker images
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
“db4292380977”是正在运行的容器。它显示相同的错误。
问题:
- 如何允许访问 jenkins 容器中的 docker?
【问题讨论】: