Files
snippets/python/docker-compose-labels.py
T
2026-05-15 12:58:02 +02:00

14 lines
267 B
Python

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=" ")