-
Notifications
You must be signed in to change notification settings - Fork 881
Bug: The examples/docker-local
template does not work out-of-the-box
#1345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
somewhat related: #1198 |
I'm running into this now with the docker-compose example. Idea 2 seems like a good idea since, for all intents and purposes, Coder should not run on localhost. All of the examples would fail as the servers would just dial themselves. re. getting started UX |
At minimum we should have documentation that addresses this for the launch. |
#1507 should hopefully reduce the friction here. |
@misskniss I think @bpmct may have already covered documentation in #1526 |
I think a good solution would be to have a "custom access URL" variable on the docker example where users could override the access URL to not use the coder default. Then we could recommend http://host.docker.internal:3000 or something in the variable description and make sure we listen on more interfaces |
@deansheather I kind of like that idea but I think there'd be an advantage to it being defined in the template/server, I don't really see a use-case for the user (of |
@deansheather is #1176 relevant to your suggestion? |
I think defining this in the docker-compose is OK. They will have to override the access URL variable in docker-compose to use non-Docker examples anyways. An error such as #1528 can help identify issues like this before it hangs on |
Closed via #1596, which includes a fix to use the Docker host socket if the access URL is not set. |
This could either be seen as a bug, documentation improvement or both.
OS Information
coder --version
:v0.5.4-devel+ad8d9dd
Steps to Reproduce
Note that here we are running
coder
inproduction
mode.CODER_PG_CONNECTION_URL="postgres://..." coder server
coder login http://127.0.0.1:3000
coder templates create docker-local -d ~/src/coder/examples/docker-local
coder create -t docker-local my-test
Expected
The
coder create
andcoder ssh my-test
commands should just work™️.Actual
(Note: I originally created this issue due to silent failure of
coder create
making it seem like it's just taking a long time for the workspace to start up, but that seems to be related to #1036 and possibly fixed?)Running
coder create --template=docker-local my-test
gives an error:But there is no indication as to what's wrong. With an older version of
coder server
(with the silent failure mentioned above), the docker container is not cleaned up and we can inspect it's log:We see that the container didn't successfully complete its bootstap due to inability to download the agent (from a bad access URL).
There are
fourthree things to observe here:127.0.0.1
which is likely not what we want to propagate inside the workspace being created inside the Docker container--address 0.0.0.0:3000
would help)--dev
instance we might not run into this issue when a tunnel is createdThecurl
error (and subsequent container exit) did not propagate and result incoder server
being able to inform the user that the bootstrap failed (terraform issue? fixed as per observations in Final output on workspace creation shows "connecting" forever - confusing UX #1036?)Notes
There are a few ways we could improve upon this, some ideas:
examples/docker-local
to mention all knobs that need to be tuned127.0.0.1
access URL is not likely to work inside any sort of container system, nor iscoder server
listening on127.0.0.1
)The text was updated successfully, but these errors were encountered: