Initialize docker stack repo

This commit is contained in:
g4st3r
2026-03-07 17:28:59 +00:00
commit 319d4eeb3e
458 changed files with 67215 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env python3
import subprocess, json
cmd = ["/usr/bin/curl", "--unix-socket", "/var/run/docker.sock", "-s", "http://localhost/containers/json?all=1"]
raw = subprocess.check_output(cmd, text=True)
data = json.loads(raw)
lines = []
for c in data:
name = c.get("Names", ["?"])[0].lstrip("/")
state = c.get("State", "?")
status = c.get("Status", "?")
image = c.get("Image", "?")
lines.append(f"{name} | {state} | {status} | {image}")
out = {"count": len(lines), "list": sorted(lines)}
print(json.dumps(out, ensure_ascii=False))