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.

  • Access a webserver inside a docker container from outside
  • How to organize architecture of an isomorphic app using docker?
  • Volume changes not persistent after “docker-compose run” command (Django's collectstatic)
  • Transitioning from other local development tools to Docker
  • Cleaning docker containers via jenkins shell on slave
  • Is there are a difference in the way Docker and Rocket (rkt) containers access Linux kernel?
  • 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.

  • curl Flask web service inside Docker container
  • Will istio add support for docker swarm?
  • Docker Volume Containers for database, logs and metrics
  • Docker version 1.13.1, Docker Swarm, jwilder/nginx-proxy will not start as a docker service
  • How to build a cassandra cluster with docker on a windows machine?
  • Which commands of the defined Linux Distribution are available in a Docker container?
  • 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.