iximiuz / cdebug

cdebug - a swiss army knife of container debugging
https://iximiuz.com/en/posts/docker-debug-slim-containers/
Apache License 2.0
1.2k stars 46 forks source link

Unable to run cdebug with MacBook M2 #47

Open borja-rivera opened 2 weeks ago

borja-rivera commented 2 weeks ago

Hello,

I am trying to use the tool on a MacBook M2 and when I try to run a container I get this error:

$ debug exec -it mycontainer
> cdebug: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

Docker is already running using colima.

Has anyone else had this happen?

Thanks!

iximiuz commented 2 weeks ago

Hi @borja-rivera,

I'm afraid Lima is not one of the (seamlessly) supported runtimes at the moment. You still can use cdebug from inside of the Lima VM (via limactl shell) - something like cdebug exec -it containerd://mycontainer should do the trick. Or, you can try using the --runtime flag to point cdebug to Lima's docker.sock location like this cdebug exec --runtime $(limactl list docker --format 'unix://{{.Dir}}/sock/docker.sock') nerdctl://mycontainer. However, I haven't tried the latter.

Curious about your findings!