Proxy in boot2docker running containers to run on port 80 and a custom host name

I’m using 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. http://192.168.59.103:8080

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.

  • Docker runs out of disk space even though containers are small
  • mount a host volume to a container created through Dockerfile
  • Accessing host machine as localhost from a Docker container that's also inside a boot2docker vm
  • How to develop Rails app running inside Docker
  • When will Docker be launched? [closed]
  • SBT with read-only base directory
  • 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.

  • org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: []
  • Docker Update hangs on Windows 10
  • LDAP authentication in Docker container
  • Do not download all Maven dependencies on a Docker build
  • How do I display output from Python application running inside Docker container?
  • Docker COPY doesn't work
  • 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:

    192.168.59.103 myproject.dev
    

    and I could go to http://myproject.dev instead of http://192.168.59.103.

    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/

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.