This commit is contained in:
2026-11-19 13:39:53 +03:00
parent 470d9d6f1e
commit 1d81159dd3
99 changed files with 10577 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
"""Allowlist container lifecycle fields for restart-hook evidence."""
import json
from pathlib import Path
import subprocess
import sys
ids=subprocess.check_output(['docker','compose','ps','-aq'],text=True).split()
items=json.loads(subprocess.check_output(['docker','inspect',*ids],text=True))
rows=[dict(id=c['Id'],name=c['Name'],service=c['Config']['Labels']['com.docker.compose.service'],
started_at=c['State']['StartedAt'],finished_at=c['State']['FinishedAt'],running=c['State']['Running']) for c in items]
Path(sys.argv[1]).write_text(json.dumps(rows,indent=2)+'\n')