Skip to main content
Summary
=======
This provides a in-memory register of docker services.

Author: Steven hk Wong
Date: Oct 2018

Credits:
monitor.py is based on the work of Miki Tebeka from http://pythonwise.blogspot.com/2015/07/dockermon-docker-process-monitor.html

Description
===========
The life cycle events of create,delete and update of docker services are captured to maintain a in-memory register.
At startup all active services are loaded from docker.
A web UI is provided to see the jason representation of the objects. (see --help)
Callbacks can be registered at startup. A callback json object is passed via stdin.

Callbacks are called with "-c script|program .e.g "python -m docker-register -c jq"

run eg: docker-register -c cb1.sh - cb1.sh is a simple democall back that logs callbacks input into /tmp/cb.log
docker-register -c consul_cb.sh - simple callback that register services to consul on localhost:8500


The callback json object:

{ "type": "service" | "container" , "operation": "register|unregister|update" , "data": { "ports":[ { "PublishedPort": [PORT], "TargetPort":[PORT] .. ], "labels": {}, "id": "THE ID" , "name": "THE NAME]" }

E.g.:
{
"type": "service",
"operation": "register",
"labels": {
"name": "cfssl",
"env": "prod"
},
"ports": [
{
"PublishedPort": 8888,
"TargetPort": 8888
}
],
"name": "cfssl",
"id": "mq6cluihpbe89in6743r3cn1b"
}



Install
=======
To install the python module run: python setup.py install


WIP
===
Adding containers into register.

Release files for docker-register 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docker-register 0.1.2
File Size Uploaded
docker-register-0.1.2.tar.gz 26.3 kB Details

Release files / docker-register-0.1.2.tar.gz

Download URL docker-register-0.1.2.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d120adfffd0697aee7bfd329e1d08bf7d01cabfe5691ebd59f47680606193ea6
BLAKE2b-256 checksum
How to use checksums
6275b31ac0141c25c0a41a3f0b9b0bf1bd46b5f1fa73ebde997c140ab0c8d5b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.7.4 pkginfo/1.3.2 requests/2.19.1 setuptools/0.9.8 requests-toolbelt/0.8.0 clint/0.5.1 CPython/2.7.5 Linux/3.10.0-862.14.4.el7.x86_64

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page