Docker windows, default template error on the template creation

Hello I'm new to Coder, and I'm trying to run the template with Docker Containers the one that is as template but it keeps failing the build
No description
25 Replies
Codercord
Codercord4mo ago
<#1245818386785767586>
Category
Help needed
Product
Coder OSS (v2)
Platform
Windows
Logs
Please post any relevant logs/error messages.
Phorcys
Phorcys4mo ago
hey, can you send your template over ?
Seirjin
Seirjin4mo ago
It's the default template that is included Haven't made my own
Phorcys
Phorcys4mo ago
there are multiple included templates, are you referring to this one?
No description
Seirjin
Seirjin4mo ago
Yes Sorry
Phorcys
Phorcys4mo ago
it's all good -- just need to make sure we're talking about the same thing what version of Coder are you running ?
Seirjin
Seirjin4mo ago
Got the docker compose from GitHub so I believe the latest
Phorcys
Phorcys4mo ago
I get this too and while it's not great it shouldn't prevent the template from building as it's just warnings are you sure you can't just ignore the messages?
Seirjin
Seirjin4mo ago
well now that i retried to build again it gave me the errros that are above and also : The attribute "owner" is deprecated. Refer to the provider documentation for details. 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 19, in provider "docker": 19: provider "docker" { since im on windows cant update the group_add ok now was able to create the container when i added user: ${PUID}:${PGID} environment: PUID: ${PUID} # <--- NEEDED PGID: ${PGID} # <--- NEEDED even tho i didnt give them value it allowed me
Phorcys
Phorcys4mo ago
you don't need the environment variables only the user value
Seirjin
Seirjin4mo ago
Oh ok thank you
Phorcys
Phorcys4mo ago
yes, the reason behind that is that otherwise the user in the container does not have access to the docker socket file you can check the permissions by doing stat /var/run/docker.sock to get a better understanding
Seirjin
Seirjin4mo ago
Ok thank you
Seirjin
Seirjin4mo ago
One more question regarding open ports that is on the docs https://coder.com/docs/networking/port-forwarding is a part use ports but I don't see it on mine, it is only on the enterprise version ?
Port Forwarding - Coder Docs
Learn how to forward ports in Coder
Phorcys
Phorcys4mo ago
it's also avaiable for OSS, are you trying to forward ports from the web version?
Want results from more Discord servers?
Add your server