Cannot create DinD container.

I followed the guide here https://coder.com/docs/coder-oss/latest/templates/docker-in-docker#use-a-privileged-sidecar-container-in-kubernetes-based-templates but DinD contianer keeps restarting throwing error.
time="2022-11-21T16:52:47.208505924Z" level=fatal msg="Error starting daemon: open /var/run/docker.pid: permission denied"
time="2022-11-21T16:52:47.208505924Z" level=fatal msg="Error starting daemon: open /var/run/docker.pid: permission denied"
Docker in Docker - Coder OSS main docs
Use docker inside containerized templates
3 Replies
Phorcys
Phorcys2y ago
I think you should run coder server as a user that has access to that file maybe it will suffice to add the actual user to thedocker group
jbot_26
jbot_262y ago
I think I got it, it was issue with security context configuration I was having
Codercord
Codercord2y ago
Marked the thread as resolved.
Want results from more Discord servers?
Add your server