diff --git a/python/docker-compose-labels.py b/python/docker-compose-labels.py new file mode 100644 index 0000000..ec5767a --- /dev/null +++ b/python/docker-compose-labels.py @@ -0,0 +1,13 @@ +import yaml + +LABEL = "leuchtturm.enable" + +with open(0) as f: + res = yaml.safe_load(f) + +for key, service in res["services"].items(): + if "labels" not in service: + continue + labels = service["labels"] + if LABEL in labels: + print(key, end=" ")