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.

Since the applications I’m working on are configured to run with a web server called Pow and URLs like htp://, I’m having trouble migration to Docker for my local development environment.

  • How do I configure docker compose to expose ports correctly?
  • Build Java Gradle project within a Docker container?
  • How to display the process id that opened a particular socket within a docker container?
  • docker hub webhook for _failed_ build?
  • How do I set up a simple dockerized RabbitMQ cluster?
  • Artifactory bad gateway error
  • So how can I point a host name like htp:// to my Docker container I’m already using another host name defined in my /etc/hosts file but I don’t know what to do about the port.

  • Error Docker deployment in Amazon EC2 - Docker container quit unexpectedly
  • bash: /bin/ping: Operation not permitted on rhel 7.1 docker image
  • How to setup Node environment variable in Dockerfile for running node.js application?
  • Docker link between varnish and wordpress not working
  • Setting ssh public keys on Docker image
  • How to run Consul on docker with initial key-value pair data?
  • 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:

    and I could go to instead of

    In theory this should also work on OSX, instructions on how to edit the hosts file there can, for example, be found here:

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