sysbox icon indicating copy to clipboard operation
sysbox copied to clipboard

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Open punitporwal07 opened this issue 2 years ago • 5 comments

Dear Team,

After setting up sysbox by following the guide on Ubuntu v20.04 with upgraded kernel 5.10.0-051000-generic, I am still not able to get container run-time.

while running docker ps inside the container it is reporting docker daemon not running.

can you please suggest, how to fix this issue, or what can be checked here?

k/r Punit

punitporwal07 avatar Feb 26 '24 17:02 punitporwal07

Hi @punitporwal07,

Thanks for trying Sysbox.

I am still not able to get container run-time. while running docker ps inside the container it is reporting docker daemon not running.

So we can help you further, please provide the exact command you are using and outputs you see when:

  1. Starting the sysbox container
  2. Starting or using Docker inside the Sysbox container

Thanks!

ctalledo avatar Feb 28 '24 03:02 ctalledo

Hi @ctalledo after setting up the sysbox runtime env at docker host, I am running a custom image(jenkins-agent) that has docker installed in it. The container is spining up via a cloud feature of jenkins -

my /etc/docker/daemon.json from host looks like -

{
    "default-runtime": "sysbox-runc",
    "runtimes": {
        "sysbox-runc": {
            "path": "/usr/bin/sysbox-runc"
        }
    },
    "bip": "172.20.0.1/16",
    "default-address-pools": [
        {
            "base": "172.25.0.0/16",
            "size": 24
        }
    ]
}

once I exec into the container I got this error -

root@xxx:/home/user$ docker exec -it 5bea961474bc bash

5bea961474bc:/data$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
5bea961474bc:/data$ which docker
/usr/bin/docker
5bea961474bc:/data$ dockerd > /var/log/dockerd.log 2>&1 &
[1] 177
5bea961474bc:/data$ bash: /var/log/dockerd.log: Permission denied

k/r Punit

punitporwal07 avatar Feb 28 '24 09:02 punitporwal07

it appears to me that, the sysbox is running as expected (big thanks to sysbox community), there seems to be an issue with the image I am using, may be first I need to check if I can run this jenkins-agent image locally to check if it is picking up the sysbox runtime env or not.

punitporwal07 avatar Feb 29 '24 10:02 punitporwal07