Coder.comC
Coder.com3y ago
21 replies
Fuglen

Permission denied creating first template

I know its been posted before but I cant find the solution.
My friend got Coder working on our Ubuntu 22.04 with docker-compose.
The error is:
Error: Error pinging Docker server: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied
on main.tf line 21, in provider "docker":
  21: provider "docker" {

I tried creating a "coder" user and adding it to the docker group without success. I restarted the Coder container, do I need to restart Docker itself too?
Solution
uncomment the group_add line and change 998 to the GID of your Docker group
Was this page helpful?