-
-
Notifications
You must be signed in to change notification settings - Fork 452
Description
Is your feature request related to a problem? Please describe
Podman is intended to be a drop-in replacement for Docker, but I can't use it in pyinfra docker operations/facts because the docker executable name is hardcoded as docker. My current workaround is a symbolic link /usr/local/bin/docker β‘οΈ /usr/bin/podman, but that feels hacky and has to be done manually for each host in the repository.
A symlink like that also complicates matters if one intends to run docker and podman on the same machine (not sure I'd recommend that anyway, but...)
Describe the solution you'd like
(edit: based on this issue's discussion, I changed my position on how to achieve feature parity. What follows below is the revised wording, the original preserved at the bottom.)
ideal solution:
- podman facts, identical in features to docker facts
- podman operations, identical in features to docker operations
In terms of implementation this can likely be achieved with something like an abstract DockerCompatibleContainer base classes or mixins, since Podman's CLI API is supposed to be identical do Docker's (though subtle differences do exist)
(original/outdated solution below)
Add a docker_executable inventory key that's passed to docker facts (which in turn enables the use of docker operations, since they rely on docker facts). Ideally the dockerssh connector would also make use of it.