-
Notifications
You must be signed in to change notification settings - Fork 20
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
Environment variable hostname not respected in docker (maybe linux in general) #160
Comments
Why is this important? Along with the port issue (#156), this is what would allow a docker container to be "plug and play". You might use the a
Very simple and easy to use for most people. Only if you need specialized webone.conf you would need to bother with volume mounts etc... |
As a part of #156 I'm planning to add support for embedding any environment variables to the WebOne is using a simple own IP/hostname detection algorithm:
Yes, all right. And in lines 357-362, where |
Cool, looking forward to it ;) |
In latest commit in |
@atauenis Great. This is nice progress. I just tested it. Here are some findings: I tested that both setting the
Both work on the info page. The css-stylesheet is loaded using the given name - I alto tried with other names than localhost which also worked. However. When I load something more complex, e.g. vogons, there is some variable substitution missing. See screenshots below |
With
DefaultHostname=%HostName%
inwebone.conf
, the docker container's internal IP addresss is used, rather than the container's hostname.Started the docker container using argument
--hostname mytest
A shell in the container shows that it is respected in the environment
Also tested with a small program built inside the container, which printed the hostname
mytest
Webone is running, but the proxy is using the container's internal IP rather than the hostname provided. You can see this when looking in the network tab of your browser:
Also the default page shows similar problems:
The problem might be in lines 218-226 in
ConfigFileLoader
, probably in line 220, though I can't see how.The text was updated successfully, but these errors were encountered: