Filter docker events by type
This commit is contained in:
parent
5d130b9303
commit
ceb275ce2d
|
|
@ -39,7 +39,10 @@ def main():
|
||||||
|
|
||||||
#listen for events to keep the hosts file updated
|
#listen for events to keep the hosts file updated
|
||||||
for e in events:
|
for e in events:
|
||||||
status = e["status"];
|
if e["Type"]!="container":
|
||||||
|
continue
|
||||||
|
|
||||||
|
status = e["status"]
|
||||||
if status =="start":
|
if status =="start":
|
||||||
container_id = e["id"]
|
container_id = e["id"]
|
||||||
container = get_container_data(dockerClient, container_id)
|
container = get_container_data(dockerClient, container_id)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue