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
Codercord6mo ago
<#1245818386785767586>
Category
Help needed
Product
Coder OSS (v2)
Platform
Windows
Logs
Please post any relevant logs/error messages.
Phorcys
Phorcys6mo ago
hey, can you send your template over ?
Seirjin
SeirjinOP6mo ago
It's the default template that is included Haven't made my own
Phorcys
Phorcys6mo ago
there are multiple included templates, are you referring to this one?
No description
Seirjin
SeirjinOP6mo ago
Yes Sorry
Phorcys
Phorcys6mo 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
SeirjinOP6mo ago
Got the docker compose from GitHub so I believe the latest
Phorcys
Phorcys6mo 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
SeirjinOP6mo 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
Phorcys6mo ago
you don't need the environment variables only the user value
Seirjin
SeirjinOP6mo ago
Oh ok thank you
Phorcys
Phorcys6mo 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
SeirjinOP6mo ago
Ok thank you
Seirjin
SeirjinOP6mo 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
Phorcys6mo ago
it's also avaiable for OSS, are you trying to forward ports from the web version?
Seirjin
SeirjinOP6mo ago
Oss ? I want to forward ports from the container to my localhost so if I have port 4200 on docker container I want to access it on my localhost idk if this makes sense
Phorcys
Phorcys6mo ago
open source what are you doing that's not working?
Seirjin
SeirjinOP6mo ago
Well I'm trying to open ports on visual code (4200 and 8090) the backend is accessible 8090 but 4200 isn't working
Phorcys
Phorcys6mo ago
why not define a coder_app in the template rather than use port forwarding ?
Seirjin
SeirjinOP6mo ago
Is there any docs that I can follow
Phorcys
Phorcys6mo ago
for context, "VS Code Web", "noVNC" and "Supervisor" are coder_apps
No description
Seirjin
SeirjinOP6mo ago
The default template includes visual code I didn't feel the need to add another one. Now since I'm trying to run two applications on the same docker container I thought that it was possible to just open the ports so they can be accessible from localhost What is strange is that on another laptop that I used coder on windows docker(older version of docker) it worked without any problem like both 4200 and 8090 were accessible from localhost Well the problem that the use ports wasn't shown because I forgot to add wildcard on the docker environment
Phorcys
Phorcys6mo ago
yup, this part should really be made clearer glad you got it figured out :-)
Codercord
Codercord6mo ago
@Phorcys closed the thread.
Want results from more Discord servers?
Add your server