Error Error pinging Docker server Cannot connect to the Docker daemon at unixvarrundocker.so

Hey team, I have already configured coder on my Azure Kubernetes cluster, configured my domain and I'm able to log in. I'm trying to upload my first Template following some steps like ( on my local machine ): - coder login coder.mycluster.com ( all good on this step ) - coder template init ( choosed the docker-code-server ) - cd ./docker-code-server && coder templates create But in this moment I got the Error: Error pinging Docker server: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? I'm using WSL2, and I'm able to run all my docker commands ( docker info, docker-compose up etc etc ). So not sure how debug this. I have the Ubuntu integration enabled on my Docker Desktop.
6 Replies
Marco Aleixo
Marco Aleixo2y ago
➜ ~ docker context ls
NAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default * moby Current DOCKER_HOST based configuration unix:///var/run/docker.sock https://mycluster-dns.hcp.brazilsouth.azmk8s.io:443 (default) swarm
desktop-linux moby
➜ ~ docker context ls
NAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default * moby Current DOCKER_HOST based configuration unix:///var/run/docker.sock https://mycluster-dns.hcp.brazilsouth.azmk8s.io:443 (default) swarm
desktop-linux moby
hey team! still struggling with this
thy
thy2y ago
is Coder running in your kubernetes cluster? if so, it won't be able to access the docker socket on your local machine when you upload a template it gets executed by the server, not your local machine!
Marco Aleixo
Marco Aleixo2y ago
hmmmm, but I'm still confused. how can I send an template to my cluster?
thy
thy2y ago
you can, but if the server can't access your docker socket it can't provision the container on your local machine
Marco Aleixo
Marco Aleixo2y ago
hmmmm, sorry I'm still confused of how can I send templates to my cluster.
Phorcys
Phorcys2y ago
you should use coder login <url> on your own machine, then coder templates update (or create) you could also send the template from the coder host to itself, that would work. the only issue is that your template point to /var/run/docker.sock and the container that Coder is running in cannot access that path, likely because it is not mounted
Want results from more Discord servers?
Add your server