Skip to content

Commit 9c60495

Browse files
committed
fix: Image starts with "localhost/" should not pull
When both image and build section exist, and the image starts with "localhost/", podman-compose tries to pull the image, which is not expected. Signed-off-by: Songmin Li <[email protected]>
1 parent 182be9b commit 9c60495

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

podman_compose.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2690,11 +2690,8 @@ def is_local(container: dict) -> bool:
26902690
* prefixed with localhost/
26912691
* has a build section and is not prefixed
26922692
"""
2693-
return (
2694-
"/" not in container["image"]
2695-
if "build" in container
2696-
else container["image"].startswith("localhost/")
2697-
)
2693+
image = container.get("image", "")
2694+
return image.startswith("localhost/") or ("build" in container and "/" not in image)
26982695

26992696

27002697
@cmd_run(podman_compose, "wait", "wait running containers to stop")

0 commit comments

Comments
 (0)