Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed git URL access in build context (#127) #745

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rad10
Copy link

@rad10 rad10 commented Aug 11, 2023

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

@rad10 rad10 force-pushed the fix-build-url-context branch from de0dce8 to 73e79a6 Compare August 11, 2023 01:51
@theyoyojo
Copy link

theyoyojo commented Mar 3, 2024

👍 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))

Copy link
Collaborator

@p12tic p12tic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in principle, but needs rebase on top of latest main. Also the PR lacks unit and integration tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants