Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Simple Virtual Hosts for Docker Containers

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Simple Virtual Hosts for Docker Containers

Small intro to Docker and why it works so well.

Presentation of a the Remote API to support virtual hosting your containers based on James Wilder's blog post: http://jasonwilder.com/blog/2014/03/25/automated-nginx-reverse-proxy-for-docker/

Demo files: https://gist.github.com/hmalphettes/dca6ca71effdb5ccd186
Presented at Singapore's Docker Meetup

Avatar for Hugues Malphettes

Hugues Malphettes

November 19, 2014
Tweet

Other Decks in Technology

Transcript

  1. How: The Union FS The KERNEL Ubuntu: “/“ “/usr/local/app1“ The

    KERNEL Ubuntu: “/“ “/usr/local/app1“ Two Instances: 600 MB
  2. How: The Union FS READ ONLY The KERNEL Ubuntu: “/“

    “/usr/local/app1“ INSTANCE #1
 Write Layer INSTANCE #2
 Write Layer Two Instances: 300 MB
  3. Virtual Hosts • The Cocktail Game where are introduced to:

    • A ruby-on-rails blog • A php DMS • An NGinx Reverse Proxy • A Dynamic DNS
  4. Dockerize • The Docker Daemon knows what IP is assigned

    to each container • Docker events: https://docs.docker.com/ reference/api/docker_remote_api/ • When containers start/stop, generate a Reverse Proxy
 config and 
 restart NGinx • Dynamic DNS based
 on the same idea
  5. Take Away • Plugging into the lifecycle of the docker

    containers • Other usage: monitoring. • … simple as long as everything is on the same host • IMO: wait a little longer for docker to natively support distributed systems.