C
Coder.com•3d ago
zztop

"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:
Error: failed to read downloaded context: failed to load cache key: invalid response status 403

on main.tf line 167, in resource "docker_image" "main":
167: resource "docker_image" "main" {
Error: failed to read downloaded context: failed to load cache key: invalid response status 403

on main.tf line 167, in resource "docker_image" "main":
167: resource "docker_image" "main" {
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
From An unknown user
From An unknown user
22 Replies
Codercord
Codercord•3d ago
<#1307207030288814151>
Category
Help needed
Product
code-server
Platform
Windows
Logs
Please post any relevant logs/error messages.
Phorcys
Phorcys•3d ago
@zztop could you send your dockerfile over?
zztop
zztopOP•3d ago
Attached the two source files from the template + the failing build log. Thanks for taking a look, Theo!
Phorcys
Phorcys•3d ago
can you try to run docker image rm ubuntu and retry?
zztop
zztopOP•3d ago
That's what I get when I try it from the Windows Power Shell:
PS C:\> docker image rm ubuntu
Error response from daemon: No such image: ubuntu:latest
PS C:\> docker image rm ubuntu
Error response from daemon: No such image: ubuntu:latest
Or did you mean I need to run it in another console?
Phorcys
Phorcys•3d ago
I meant running that on server that hosts the Docker instance that's used by your Coder instance
zztop
zztopOP•3d ago
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:
No description
zztop
zztopOP•3d ago
(Apologies for all the hand holding that I require)
Phorcys
Phorcys•3d ago
can you try to docker build the Dockerfile manually?
zztop
zztopOP•3d ago
It took me embarrassingly long to figure out how. Here's the result (attached log)
zztop
zztopOP•3d ago
(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...)
Phorcys
Phorcys•2d ago
@zztop could you retry building the workspace?
zztop
zztopOP•2d ago
(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.
Phorcys
Phorcys•2d ago
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?
zztop
zztopOP•2d ago
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.
Phorcys
Phorcys•2d ago
i'll retry it on my end as well I am thinking there could be an issue related to this
zztop
zztopOP•2d ago
I'm starting coder directly in the powershell of the host machine (i.e., my Windows 11 Home laptop) with this command:
PS C:\Users\vesel> coder server
PS C:\Users\vesel> coder server
This is how I understood the instructions from https://coder.com/docs/tutorials/quickstart
Coder quickstart - Coder Docs
Try it out for yourself
From An unknown user
From An unknown user
Phorcys
Phorcys•2d ago
oh yeah i'm not sure that'll work
zztop
zztopOP•2d ago
Ha! Is there anything else I can try instead? Are you suggesting I could start the coder server from within the docker instance?
Phorcys
Phorcys•2d ago
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 that
zztop
zztopOP•2d ago
Thanks 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.
Phorcys
Phorcys•23h ago
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
Want results from more Discord servers?
Add your server