Refactoring code for podman support #234
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Refactoring code to support Podman
Point of attention
TO DO
DockerUtils.py:
api.pull/build/remove_volume
function to podman: [FEATURE] - Add pull/build/remove_volume function for api/image.py as docker py containers/podman-py#456ConstantConfig.IMAGE_NAME in [repo_tag.split(':')[0] for repo_tag in img.attrs.get("RepoTags", [])]:
does not manage well cases where user pulled manually exegol image containing also the registry name, for exampledocker.io/nwodtuhs/exegol
. In this scenario, it won't enter in if statement. It is needed to addany
to manage cases where locally I have more container images. [Fixed in PR]ExegolImage.py:
As above, cannot enter in if statement in case user pulled manually an image by specifying
docker.io
. Need to usein
instead ofstartswith
. [Fixed in PR]Evaluate if it is needed to manage
if
statements involvingConstantConfig.IMAGE_NAME
in other files to manage the presence of prefixdocker.io
in the image name.ExegolController.py - Import
podman
and manageconsole.print_exception(show_locals=True, suppress=[docker, requests, git])
to consider podman module too.ConstantConfig.py:
from docker.types import Mount
for podman: [FEATURE] - Implement Mount type containers/podman-py#458