Skip to content

Commit b410fe1

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 <lisongmin@protonmail.com>
1 parent 88b489a commit b410fe1

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
@@ -2753,11 +2753,8 @@ def is_local(container: dict) -> bool:
27532753
* prefixed with localhost/
27542754
* has a build section and is not prefixed
27552755
"""
2756-
return (
2757-
"/" not in container["image"]
2758-
if "build" in container
2759-
else container["image"].startswith("localhost/")
2760-
)
2756+
image = container.get("image", "")
2757+
return image.startswith("localhost/") or ("build" in container and "/" not in image)
27612758

27622759

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

0 commit comments

Comments
 (0)