podman-compose icon indicating copy to clipboard operation
podman-compose copied to clipboard

Fixed git URL access in build context (#127)

Open rad10 opened this issue 2 years ago • 1 comments

I noticed that podman-compose does not work for using URLs and repos, so I made a fix for it

rad10 avatar Aug 11 '23 01:08 rad10

👍 I'm using this commit in my fork but we patched it with this:

diff --git a/podman_compose.py b/podman_compose.py
index d00a882..9ab4b9e 100755
--- a/podman_compose.py
+++ b/podman_compose.py
@@ -2165,7 +2165,7 @@ async def build_one(compose, args, cnt):
     if os.path.exists(os.path.join(ctx, dockerfile)):
         dockerfile = os.path.normpath(os.path.join(ctx, dockerfile))
     build_args = ["-t", cnt["image"]]
-    if os.path.exists(dockerfile) or re.match(r"://", ctx) or re.match(r"[^:]+:.+", ctx):
+    if os.path.exists(dockerfile):
         build_args.extend(["-f", dockerfile])
     for secret in build_desc.get("secrets", []):
         build_args.extend(get_secret_args(compose, cnt, secret))

theyoyojo avatar Mar 03 '24 04:03 theyoyojo