-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Allow to run with podman instead of docker. #1160
Comments
I have not used podman yet but I'm open to the idea :) Can you provide an example of CI configuration using podman that could be generated ? |
Hi, I'll update something here in a few days. Thanks for the reply. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this issue should stay open, please remove the |
I'll see if I can do a PR when I'm free. Will close this for now. |
I was able to get Megalinter to use Podman by symlinking the docker executable to it and running a podman service to expose a socket: ln -s /usr/bin/podman /usr/bin/local/docker
podman system service unix:///var/run/docker.sock -t 0 & However the runner doesn't actually finish, for me it seems to get stuck at the some point every time. It's almost done, and I have a bunch of individual linter logs, but the final console report isn't generated. |
I'm not sure if this applies to your situation, but rootless containers were the OP's motivation for using Podman. Docker has a rootless mode as well, and rootless-docker lets you use Docker's rootless mode on GitHub Actions if either of those are of use to you. I am afraid I don't have any experience with Podman, but I'm guessing you would need to open a shell in the container and use some debugging tools. For almost any MegaLinter-related debugging, I recommend setting |
Related podmn issue: #2646 (comment) |
I can't use mega-linter with podman (Manjaro Linux):
Is this sth you want to fix ? That would be awesome, it's the first project I encounter that doesn't with podman but only with docker. |
@hinricht are you able to run MegaLinter docker image directly with podman ? (example of raw call with docker) If yes and if you can provide the command line, we could update mega-linter-runner so it can call podman and not docker :) |
@nvuillam Unfortunatly not. It fails because I don't have permissions to access
Why does megalinter need access to docker.sock/podman.sock ? |
Oh wait, I found a way to run mega-linter with podman. I needed to activate the user socket like this:
|
Seems great :) Docker-in-docker is used with very few linters (only swiftlint that does not very well I think), so you can also try without the -v argument, it might work even without your workaround :) |
It would be great to reflect this in the docs to make it easier for podman users to get started. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this issue should stay open, please remove the |
Is your feature request related to a problem? Please describe.
I am shifting from docker to podman for rootless containers but mega-linter uses docker.
Describe the solution you'd like
Megalinter can allow the user to choose the container runtime (docker or podman) during project setup (or user can add to the config manually). If podman is chosen, megalinter will replace docker with podman when running.
Describe alternatives you've considered
Let user define docker binary. As podman is compatible with docker in terms of usage (sub command, flags and arguments) this should work, but need further testing.
Additional context
The text was updated successfully, but these errors were encountered: