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

Podman engine support #159

Open
babykart opened this issue May 9, 2019 · 2 comments
Open

Podman engine support #159

babykart opened this issue May 9, 2019 · 2 comments

Comments

@babykart
Copy link
Contributor

babykart commented May 9, 2019

Hi,

podman (https://github.com/containers/libpod) support all docker commands, Dockerfiles, and it can be run as user.
You can find in attachment podman.sh that is a copy of the engine/docker.sh with minor modifications.
The bob-*, builder and image templates does not need modifications.
Install podman on gentoo:

emerge -av libpod
cd ${_kubler_install_dir}
ln -sr template/docker template/podman
ln -sr engine/docker engine/podman
wget https://github.com/edannenberg/kubler/files/3161965/podman.txt -O engine/podman.sh

podman.txt

Let me know if you prefer a PR...

PS - @edannenberg thank you for this awesome project.

@edannenberg
Copy link
Owner

Hey,

thank you for this! A PR would indeed be prefered but no worries if you are busy.

Had a quick look at the changes, as Podman seems to be a true in-place replacement for Docker we should try to reduce code duplication as much as possible. You can kinda "extend" docker.sh like so:

#!/usr/bin/env bash

source "${_KUBLER_DIR}"/engine/docker.sh

# override functions/vars as required..
DOCKER="podman"

As most changes are related to var names and output it might be better to change docker.sh so it can be extended without having to duplicate a lot of code. Let me know if you need help with that, you can also hit me up on Discord.

@babykart
Copy link
Contributor Author

babykart commented May 10, 2019

Clearly a better approach than mine.
With your approach, the only modification needed in engine/docker.sh is to avoid '-f' argument for 'podman image prune' in build_image():

    [[ "${KUBLER_POSTBUILD_IMAGE_PRUNE}" == 'true' ]] \
        && _status_msg="remove untagged images" && pwrap "${DOCKER}" image prune -f

I will working on it this week end and after some tests, I will do a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants