Toger Blog

Mesos, Docker and Consul

I was playing with Mesos/Marathon + Docker recently and tried to integrate Consul. Mesos sets the Docker container ‘name’ to a internal value that messes with the Consul Registrator, something like mesos-aa998abcabab. Registrator can accept an environmental variable telling it what service name to register as instead. The format for that is:

Registrator will register the instance with a service name of nginx-xyz