Proxy in boot2docker running containers to run on port 80 and a custom host name
boot2docker to setup different Docker containers on OSX. However the URLs for the applications running in these Docker containers are accessible through the IP and port e.g.
Since the applications I’m working on are configured to run with a web server called Pow and URLs like
htp://myproject.dev, I’m having trouble migration to Docker for my local development environment.
So how can I point a host name like
htp://myproject.dev:80 to my Docker container
http://192.168.59.103:8080? I’m already using another host name defined in my
/etc/hosts file but I don’t know what to do about the port.
One Solution collect form web for “Proxy in boot2docker running containers to run on port 80 and a custom host name”
I am on Windows, but putting an entry into the system’s hosts file did work for me. I included a line like this:
In theory this should also work on OSX, instructions on how to edit the hosts file there can, for example, be found here: http://www.tekrevue.com/tip/edit-hosts-file-mac-os-x/