From ceb275ce2d8de223d5398b6f7c8a2e197b19fad1 Mon Sep 17 00:00:00 2001 From: David Darias Date: Sat, 30 Jun 2018 16:55:28 -0400 Subject: [PATCH] Filter docker events by type --- hoster.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hoster.py b/hoster.py index 1f2883d..1e762e8 100644 --- a/hoster.py +++ b/hoster.py @@ -39,7 +39,10 @@ def main(): #listen for events to keep the hosts file updated for e in events: - status = e["status"]; + if e["Type"]!="container": + continue + + status = e["status"] if status =="start": container_id = e["id"] container = get_container_data(dockerClient, container_id)