You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Podman support by allowing defining the docker executable name #2920
I'd like to use podman (on Windows WSL2) as the docker-compatible backend, and use pre-commit docker/docker_image hooks against that.
Since the current implementation requires docker commands to be available those binaries need to be downloaded separately. There are also some very hard to debug inconsitensies in this setup (like docker run --rm ... run againsts the podman socket returns 0 instead of the actual code and causes hooks to pass, fixed lately podman-container-tools/podman#18889).
Related issue (#2779) about pre-commit using the API instead of the executable was closed, so this would be an alternative way to use podman-based containers and not needing extra work to provide the docker cli for pre-commit.
Maybe this could be implemented via some kind of environment variable like PRE_COMMIT_DOCKER_EXECUTABLE=podman and populated to the commands from that, defaulting to docker?
Some users might have docker, some might have podman, some might have none. Forcing them to alter their system settings is intrusive and will likely break other tools/applications. Probably a more friendly mechanism would be to just look for first executable found and use that. I do expect that docker would still be prefered for back compatibility reasons. WDYT?
Activity
asottile commentedon Jul 5, 2023
please continue the discussion in #1243
asottile commentedon Jul 5, 2023
fwiw
ln -s podman dockerworks pretty well for messbarnea commentedon Jun 17, 2024
Some users might have docker, some might have podman, some might have none. Forcing them to alter their system settings is intrusive and will likely break other tools/applications. Probably a more friendly mechanism would be to just look for first executable found and use that. I do expect that docker would still be prefered for back compatibility reasons. WDYT?
Avoid using docker_image pre-commit hook (portability)
asottile commentedon Jun 17, 2024
#2920 (comment)