Skip to content

Instantly share code, notes, and snippets.

@smo921
Last active August 29, 2015 14:13
Show Gist options
  • Save smo921/da18237705cbc86ee1b3 to your computer and use it in GitHub Desktop.
Save smo921/da18237705cbc86ee1b3 to your computer and use it in GitHub Desktop.
consul + registrator

  • Start consul
docker run -ti --rm -p 8400:8400 -p 8500:8500 -p 8600:53/udp -h node1 --name consul progrium/consul -server -bootstrap -ui-dir /ui

  • Start registrator
docker run --rm -ti -v /var/run/docker.sock:/tmp/docker.sock -h 192.168.1.13 --link consul:consulserver progrium/registrator consul://consulserver:8500

  • View consul ui at http://localhost:8500/ui/dist/#/dc1/services
  • Start and stop docker containers and consul is notified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment