No access to built workspace
We use Coder Coder v0.13.2+88bb901 on a Ubuntu 22.04. Machine. Some workspaces (Dockerfiles) work fine but when we use some other dockerfiles like the following:
We are getting the problem shown in the image. The container is running. We can access the container with docker exec -i containernane bash but on the coder webpage we can't access the workspace. Neither ssh or vscode is shown.
Is there something we can do about this? Is it a problem with teraform or our docker? Let me know if you need further information.
32 Replies
can you show me your template file ?
(the
.tf
)sure
hmm
seems fine to me
i think the container's coder agent is having trouble connecting to your coder instance
could we help it connect?
I'm not sure..
there are likely some steps to debug but I can't find of anything
did you change this line ?
entrypoint = ["sh", "-c", replace(coder_agent.main.init_script, "/localhost|127\\.0\\.0\\.1/", "host.docker.internal")]
you could try setting it to this
entrypoint = ["sh", "-c", replace(coder_agent.dev.init_script, "127.0.0.1", "host.docker.internal")]
we used the standards as far as i know and with others dockerfiles it works. but I can try to change it and try it again.
oh wait, does it not work only with some dockerfiles?
looks like i misread your issue then
is this your complete dockerfile ?
yes. some dockerfiles work, others not
that won't matter then
this is a complete dockerfile that doesn't work (minimal)
ok
hmm
i think it's not liking the fact that the dockerfile is only a
FROM
statement
unsure
can you show me the logs ?we used also a dockerfile with more stuff. but this is the minimal file to reproduce the error.
I will send the logs. one moment
here is the log to the workspace generation
uuuh
this isn't what it shoud output
this is what i'd like to see
mhmm. should we update our teraform to 0.6.3. and docker? Or what could be the problem?
can you screenshot this tab ?
sure. is this enough or more?
a bit more maybe
I printed the full page to pdf and used kreuzwerker 2.23.0 and coder 06.3 (same problem)
Our output from working dockerfiles looks pretty similar
hmm
this looks fine
really weird
I have no clue how to debug this
maybe @Ben can take a look
😟 but thank you for your help so far. We try to change some more stuff and maybe we find a solution (or problem) on our end
i hope so !
and if you find the solution it'd be kind to share it :)
Of course. There is nothing more irritating than https://xkcd.com/979/
xkcd: Wisdom of the Ancients
All long help threads should have a sticky globally-editable post at the top saying 'DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far ...'
Now after a while the workspace shows . This is something we didn't see before
We got it to work... We didn't read the documentation close enough. Our containers didn't have curl installed. By adding curl to our dockerfile install sripts it worked. Thanks again and sorry for not reading the documentation
Happy to hear you got it working!
Marked the thread as resolved.
oooh damn
omg kyle using my bot i feel so accomplished