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

git URLs in context in docker-compose.yml #127

Open
sanjayankur31 opened this issue Mar 17, 2020 · 5 comments
Open

git URLs in context in docker-compose.yml #127

sanjayankur31 opened this issue Mar 17, 2020 · 5 comments

Comments

@sanjayankur31
Copy link

Hello,

Not sure if this is meant to work yet, or not, but one can apparently include git urls in context: in docker compose files:

Either a path to a directory containing a Dockerfile, or a url to a git repository.

https://docs.docker.com/compose/compose-file/compose-file-v2/#build

This isn't working for me. I get:

Traceback (most recent call last):                                                                                                                                                            
  File "/usr/bin/podman-compose", line 11, in <module>                                                                                                                                        
    load_entry_point('podman-compose==0.1.6.dev0', 'console_scripts', 'podman-compose')()                                                                                                     
  File "/usr/lib/python3.8/site-packages/podman_compose.py", line 1267, in main                                                                                                               
    podman_compose.run()                                                                                                                                                                      
  File "/usr/lib/python3.8/site-packages/podman_compose.py", line 755, in run                                                                                                                 
    cmd(self, args)                                                                                                                                                                           
  File "/usr/lib/python3.8/site-packages/podman_compose.py", line 939, in wrapped                                                                                                             
    return func(*args, **kw)                                                                                                                                                                  
  File "/usr/lib/python3.8/site-packages/podman_compose.py", line 1012, in compose_build                                                                                                      
    build_one(compose, args, cnt)                                                                                                                                                             
  File "/usr/lib/python3.8/site-packages/podman_compose.py", line 996, in build_one                                                                                                           
    raise OSError("Dockerfile not found in "+ctx)                                                                                                                                             
OSError: Dockerfile not found in git://github.com/SilverLabUCL/docker-redmine-osb.git             

Even if I use https://, it still gives the same error.

@muayyad-alsadi
Copy link
Collaborator

my podman version says

       The build context directory can be specified as the http(s) URL of an archive, git repository or Containerfile.

would you please try using podman build ... and tell me if the problem is in podman or podman-compose

@sanjayankur31
Copy link
Author

Sure, I'll have a look and report back. Cheers.

@prk3
Copy link

prk3 commented Apr 17, 2020

I am getting a similar error message.

Error: error getting image "sundae_server": unable to find a name and tag match for sundae_server in repotags: no such image
Traceback (most recent call last):
  File "/usr/bin/podman-compose", line 11, in <module>
    load_entry_point('podman-compose==0.1.6.dev0', 'console_scripts', 'podman-compose')()
  File "/usr/lib/python3.7/site-packages/podman_compose.py", line 1267, in main
    podman_compose.run()
  File "/usr/lib/python3.7/site-packages/podman_compose.py", line 755, in run
    cmd(self, args)
  File "/usr/lib/python3.7/site-packages/podman_compose.py", line 939, in wrapped
    return func(*args, **kw)
  File "/usr/lib/python3.7/site-packages/podman_compose.py", line 1046, in compose_up
    compose.commands['build'](compose, build_args)
  File "/usr/lib/python3.7/site-packages/podman_compose.py", line 939, in wrapped
    return func(*args, **kw)
  File "/usr/lib/python3.7/site-packages/podman_compose.py", line 1012, in compose_build
    build_one(compose, args, cnt)
  File "/usr/lib/python3.7/site-packages/podman_compose.py", line 996, in build_one
    raise OSError("Dockerfile not found in "+ctx)
OSError: Dockerfile not found in https://github.com/prk3/sundae-collab-server.git

My docker-compose.yml contains:

  server:
    build: https://github.com/prk3/sundae-collab-server.git

podman build works fine:

podman build --tag thingabc:0.1 https://github.com/prk3/sundae-collab-server.git

@jgillich
Copy link

Same issue here. Looks like local file access is hardcoded.

@rad10
Copy link

rad10 commented Aug 10, 2023

I'm noticing that this still hasnt been fixed yet in the latest version of docker compose. Is there a PR to fix this yet?

rad10 added a commit to rad10/podman-compose that referenced this issue Aug 11, 2023
rad10 added a commit to rad10/podman-compose that referenced this issue Aug 11, 2023
Signed-off-by: RadioLogic <ncottrellweb@gmail.com>
theyoyojo pushed a commit to underground-software/podman-compose that referenced this issue Feb 21, 2024
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

No branches or pull requests

5 participants