skiffos / SkiffOS

Any Linux distribution, anywhere.
https://skiffos.com
MIT License
687 stars 51 forks source link

podman: add support #186

Closed paralin closed 2 years ago

paralin commented 2 years ago

Add support for podman under the apps/podman layer.

podman is a modern lighter weight alternative to Docker that has the same CLI and supports features like rootless containers.

The apps/podman layer could install a symlink so that the "docker" command aliases to "podman".

In future:

Skiff/core could be rewritten to use the podman API instead of the Docker API, and use a k8s Pod syntax to define containers instead of the skiff-core yaml config used today.

Greylinux commented 2 years ago

I was just thinking about this , this morning and I thought i'll create an issue for it. Beat me to the punch ! Nice work @paralin

I think podman will be a great addition to SkiffOS

paralin commented 2 years ago

https://github.com/skiffos/buildroot/pull/20

Added a working podman package for both host & target.

There are a few TODOs remaining before merging.

VarLad commented 2 years ago

@paralin After podman, can I make a feature request for https://github.com/containers/toolbox and https://github.com/89luca89/distrobox ? Those would be convenient to have on SkiffOS

paralin commented 2 years ago

@VarLad can do. In the meantime, though, you can probably accomplish the same thing with Skiff Core.

aschamberger commented 2 years ago

In future:

Skiff/core could be rewritten to use the podman API instead of the Docker API, and use a k8s Pod syntax to define containers instead of the skiff-core yaml config used today.

Another alternative would be to implement the docker compose yaml format. This way you could just use docker compose on another OS and later migrate to SkiffOS.

This would help in migrating my project to SkiffOS: I use docker compose on PiOS for my multiroom audio server to set up 8 container instances with all the container specific config within an env file. Via the profile feature I can only start the desired instances via docker-compose -f compose.yml --profile on up -d based on environment variables. I plan to build sometime a small supervisor container that allows changing the env file.

paralin commented 2 years ago

@aschamberger You can already use docker compose with apps/compose - does that work?

Skiff Core is more meant to define long-running containers with ssh drop-in. I don't know if the compose format would translate 1-1

paralin commented 2 years ago

All of the Buildroot packages for podman, catatonit, conmon, cni-plugins, crun have been submitted upstream & are in the SkiffOS tree. #235 tracks merging the config packages apps/podman and apps/crun

paralin commented 2 years ago

Podman support is merged to master with apps/podman 🥳

VarLad commented 2 years ago

@VarLad can do. In the meantime, though, you can probably accomplish the same thing with Skiff Core.

@paralin Any chance we can get a Fedora/Fedora-based image in skiff/core in the future? :sweat_smile:

paralin commented 2 years ago

@tianyuanhao I updated the package, thanks. Will resubmit.

By the way, some of those Buildroot packages in minikube could use an update. Replace cni with my cni-plugins for example, because cni doesn't even use the Go build infrastructure. The licenses & a few other details could be updated in crun too.

Hopefully they just use the upstream packages once they are merged.

@VarLad please open an issue on that

paralin commented 2 years ago

@tianyuanhao For the update... We still need to run AUTORECONF...

WARNING: 'automake-1.16' is probably too old.
         You should only need it if you modified 'Makefile.am' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'automake' program is part of the GNU Automake package:
paralin commented 2 years ago

@VarLad Fedora, distrobox, and toolbx are all added. :)

VarLad commented 2 years ago

That was really fast. Thanks a lot @paralin

paralin commented 1 month ago

@tianyuanhao that's true. It needs some love, I'm still using containerd and runc and don't have time to switch to podman right now. If you want to fix it up, PRs are welcome! And feel free to resubmit my patches to buildroot with your revisions.