O'Reilly logo

Build Your Own PaaS with Docker by Oskar Hane

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Automating the process of mapping domains

The limitations in this setup are that it's manual and hands-on every time a new domain is added. On my website (http://oskarhane.com), I've written some blog posts about how this process could be automated and those posts are my most-read posts of all time.

I was very glad when I found nginx-proxy by Jason Wilder. nginx-proxy solves this problem in a more clever way than me by monitoring Docker events via the Docker Remote API.

Note

You can read more about nginx-proxy on its GitHub page (https://github.com/jwilder/nginx-proxy).

nginx-proxy comes as a container and we can run it by executing the following command:

docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock jwilder/nginx-proxy

We are giving ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required