Closed ollietreend closed 7 years ago
This was easier to implement that I thought.
@FreedomBen I've created a PR in the relevant repository: FreedomBen/dory-http-proxy #2
Yeah, I really like this idea. Will check out the PR, thank you!
Thanks for your contribution :-)
Relevant PR has been merged, built, and pushed up to docker hub.
Dory has been updated to version 0.6.3 and now points at this image. So everything should be good to go!
Happy to help @FreedomBen 👍 thanks for merging it in.
It'd probably be useful to mention xip.io support in the project's README, but I didn't get around to that. If I get some time I'll put something together.
It'd be really useful if dory supported xip.io virtual hostnames.
This would allow access to running containers from other devices on the LAN, which is really useful for example when testing web apps on mobile devices.
The project Varying-Vagrant-Vagrants/VVV implements this in a really nice way. A similar approach here would work well, I think.
So, for example, I could have a container running with
VIRTUAL_HOST
ofexample.docker
, and my host IP address is192.168.0.10
. From a mobile device on the same network, I'd be able to access the container by going tohttp://example.docker.192.168.0.10.xip.io
(since this would resolve to the host IP).It looks like
dory-http-proxy
already binds to0.0.0.0
, so the server will be accessible from other devices on the network.The only missing piece is adding a xip.io hostname regex to each virtual host's
server_name
entry in the nginx configuration. Something like this should work (inspired by VVV):