Automatically register every Docker container's service in Consul so other services can discover it without manual configuration.
Set up service TTLs so stale registry entries expire automatically if Registrator itself goes offline.
Add tags and metadata to all registered services for easier filtering in your service registry.
Use explicit opt-in mode so only containers labeled for registration get added to the service registry.
Requires a running Docker host and an accessible Consul, etcd, or SkyDNS instance.
Registrator is a tool that automatically handles service registration for applications running inside Docker containers. When a container starts up, Registrator detects it and registers the service with a service registry so other parts of your infrastructure know it exists and how to reach it. When a container stops, Registrator removes the entry. This removes the need for each application to manage its own registration logic. Service registries are systems that keep a live directory of running services and their network addresses. Registrator supports three of them: Consul, etcd, and SkyDNS 2. You point Registrator at whichever one you use by passing its address as a command-line argument when starting Registrator itself. You run Registrator as a Docker container on the same host as your other containers. It connects to the Docker socket, which lets it watch for container events. The provided run command passes it Consul's address as the target registry. From that point it monitors container starts and stops and updates Consul accordingly. There are several configuration options. You can set a TTL so registered services expire automatically if Registrator itself goes offline, control whether it resynchronizes its records on an interval, add tags to all registered services, and choose whether deregistration happens immediately when a container exits or only when it exits cleanly. An explicit mode lets you opt in to registration on a per-container basis using labels. The project is licensed under MIT and accepts pull requests. A developer guide for building custom registry backends is available in the full documentation.
← gliderlabs on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.