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

[feature] Podman runner #17743

Open
1 task done
dyamon opened this issue Feb 10, 2025 · 4 comments · May be fixed by #17786
Open
1 task done

[feature] Podman runner #17743

dyamon opened this issue Feb 10, 2025 · 4 comments · May be fixed by #17786
Assignees

Comments

@dyamon
Copy link

dyamon commented Feb 10, 2025

What is your suggestion?

Hi all,

At the moment it seems like the docker runner needs docker (and the docker python module) to work.
It would be nice, in the long run, to support other container management tools, like podman.

I had a quick look at conan/internal/runner/docker.py and I feel like it won't be too hard to adapt it to support podman as well.
It might even be nice to have a ContainerRunner class with different specializations for the supported tools.
For the python API, we may use the podman python package.

I'd be happy to take a swing at it myself, if you like the idea.
Also if you have any additional pointers for this, they are gladly appreciated.

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@jcar87
Copy link
Contributor

jcar87 commented Feb 10, 2025

Hi @dyamon - thanks for proposing this request.

This sounds like a good idea. We do currently support multiple runner types - Docker is the only one currently publicly available, but we have SSH and WSL as well (see https://github.com/conan-io/conan/blob/develop2/conan/cli/commands/create.py#L67-L83) - I believe that for a new runner, they'd have to have the same constructor interface and implement the run() method

We don't tend to use class inheritance much in the codebase - it may well be that simply proposing a new runner that uses podman does the job - however if the docker and podman implementations end up being too similar, it may be beneficial -

Feel free to give it a go and we can look into it!

@dyamon
Copy link
Author

dyamon commented Feb 10, 2025

Cool, thanks. Yeah I was happy to see that new runners are in the works. Lots of potential, especially with the SSH one.

I'll submit a first version as a plain new runner for podman, and let you decide on the factoring of part of the code in an abstract class.

@aagor
Copy link

aagor commented Feb 13, 2025

As podman has a (at least partly) Docker-compatible API, it may work with the docker runner and pointing to the podman API socket instead of Dockers.
However, it doesn't work out of the box for me, but maybe it only needs some small changes. May be worth to check.

@dyamon
Copy link
Author

dyamon commented Feb 13, 2025

The API is mostly compatible, and I feel one could refactor the two runners into one. If I have some time today I'll submit the new runner, I kept the changes to a minimum to highlight the differences.

@dyamon dyamon linked a pull request Feb 14, 2025 that will close this issue
3 tasks
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 a pull request may close this issue.

3 participants