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.

Metadata

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 Provenance Actions
docker-register-0.1.2.tar.gz 26.3 kB Without provenance Details for docker-register-0.1.2.tar.gz

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

Security for docker-register 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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