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
25 Replies
<#1245818386785767586>
Category
Help needed
Product
Coder OSS (v2)
Platform
Windows
Logs
Please post any relevant logs/error messages.
hey, can you send your template over ?
It's the default template that is included
Haven't made my own
there are multiple included templates, are you referring to this one?
Yes
Sorry
it's all good -- just need to make sure we're talking about the same thing
what version of Coder are you running ?
Got the docker compose from GitHub so I believe the latest
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?
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
you don't need the environment variables
only the
user
valueOh ok thank you
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 understandingOk thank you
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
it's also avaiable for OSS, are you trying to forward ports from the web version?
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
open source
what are you doing that's not working?
Well I'm trying to open ports on visual code (4200 and 8090) the backend is accessible 8090 but 4200 isn't working
why not define a
coder_app
in the template rather than use port forwarding ?Is there any docs that I can follow
for context, "VS Code Web", "noVNC" and "Supervisor" are
coder_app
sGuided tour - Coder Docs
Create a template from scratch
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
yup, this part should really be made clearer
glad you got it figured out :-)
@Phorcys closed the thread.