"main.tf line 167"
Good evening all!
I'm completely new to Coder and I was following the quickstart instructions at https://coder.com/docs/tutorials/quickstart for a Windows 11 Home machine.
I got both Coder and Docker installed on my machine, but when I try to Build a workspace I get this error:
I found at least one other thread running into that error just a couple months back , but in their case it seems to have happened on a non-windows machine and I could not make up anything from their resolution - apparently some changes to a Docker file that find no trace of on the windows machine.
I tried on a completely different windows machine and I got exactly the same result.
Where do I start troubleshooting that? Please yelp!
Coder quickstart - Coder Docs
Try it out for yourself
22 Replies
<#1307207030288814151>
Category
Help needed
Product
code-server
Platform
Windows
Logs
Please post any relevant logs/error messages.
@zztop could you send your dockerfile over?
Attached the two source files from the template + the failing build log. Thanks for taking a look, Theo!
can you try to run
docker image rm ubuntu
and retry?That's what I get when I try it from the Windows Power Shell:
Or did you mean I need to run it in another console?
I meant running that on server that hosts the Docker instance that's used by your Coder instance
That's right. The Docker instance is hosted on my Windows machine. That's what my Docker terminal looks like. With the failing command printed at the bottom:
(Apologies for all the hand holding that I require)
can you try to
docker build
the Dockerfile manually?It took me embarrassingly long to figure out how. Here's the result (attached log)
(I'm stepping away from my laptop for most of the morning. Thanks for your help so far. Hopefully we can pick up the troubleshooting later again...)
@zztop could you retry building the workspace?
(I'm on and off the whole day today, sorry)
I just retried building a workspace from the template, but I still get the same error
Overall, I get the feeling that the vanilla quick-start process for Coder might be currently broken for Windows machines (again, I ran into that on two separate PCs, one of which I actually re-imaged overnight for a good measure). So I'd be surprised if there are no other Windows users running into that now (or perhaps there are not that many Windows users for Coder in the first place?). I betcha that if a more knowledgeable person tried to install this on Windows today, they would run into the same problem but they could quickly figure out which part of the config needs some tweaking.
@Phorcys , the other thing I was wondering if you'd have some guidance how to try is, to try manually running and tweaking the terraform script (main.tf) from within the docker instance. The error is happening while executing that script, IIUC the sequence of build actions.
Windows users are more rare but it works properly in my machine and I never ran into this issue
this seems to be a Docker-specific issue
you could use the
terraform
CLI but honestly I'm not sure that'd be worth your time
how are you running Coder? docker-compose?Hey Theo, thanks for sticking with me. I really appreciate it. My son and I made some great progress installing the Coder on Ubuntu. So far, we created two user workspaces and were able to log in from different machines, incl. from a Chromebook. So far so good. Now we are looking into installing Java compiler - haven't figured that part out.
I'm probably going to give up attempting the Windows installation for now, though it would have been great if we figured it out.
i'll retry it on my end as well
I am thinking there could be an issue related to this
I'm starting coder directly in the powershell of the host machine (i.e., my Windows 11 Home laptop) with this command:
This is how I understood the instructions from https://coder.com/docs/tutorials/quickstart
Coder quickstart - Coder Docs
Try it out for yourself
oh yeah i'm not sure that'll work
Ha! Is there anything else I can try instead?
Are you suggesting I could start the coder server from within the docker instance?
not really
but basically the way this works is that by default it'll look for a docker socket at
/var/run/docker.sock
the default is probably different on windows but I think that's why you're getting that error
well, i'm not sure though because it should fail differently
let me try
yeah so @zztop, while i reproduce, you could try deploying coder inside WSL with WSL integration enabled in Docker desktop (enabled by default)
yeah it works properly on my end (Coder v2.17.2 running on Windows, with Docker desktop alongside) so i'm not sure what's up with thatThanks for trying hard, Theo. I poked with few more options here, including tried building a Docker build from the Dockerfile posted in the "Tailscale in workspace" thread a few months ago - to no avail. Given my lack of experience with all of these systems involved, I don't think I can crack it 🙂
We'll just stick with our Coder on Ubunto option that seems to work fine.
sounds good! let me know if you ever retry it!
to me you're doing everything right but there must be a quirk with your setup that i didn't spot