fix: add --type=container to docker inspect to prevent Podman conflicts (#418)

* fix: add --type=container to docker inspect to prevent Podman conflicts

Adding `--type=container` ensures `docker inspect` targets containers
specifically, preventing conflicts with images in Podman.

* Format Python code using pre-commit hook

---------

Co-authored-by: Sid Golestaneh <sid@golestaneh.com>
This commit is contained in:
Sid Golestane 2025-02-28 17:03:21 -08:00 committed by GitHub
parent ae6b2bef59
commit a402fee13b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,10 @@ log = getLogger(__name__)
def docker_container_status(container: str) -> str:
result = subprocess.run(
["docker", "inspect", container], capture_output=True, text=True, check=False
["docker", "inspect", "--type=container", container],
capture_output=True,
text=True,
check=False,
)
if result.returncode != 0:
return "not found"