containers / bootc

Boot and upgrade via container images
https://containers.github.io/bootc/
Apache License 2.0
686 stars 78 forks source link

Drop host requirement on `skopeo` #81

Closed cgwalters closed 9 months ago

cgwalters commented 1 year ago

Today, bootc install runs from a privileged container, using the host kernel, but otherwise all binaries executed come from the container (including e.g. mkfs.xfs etc.).

With one glaring exception; today we need skopeo in the host. For more information on this, see https://github.com/containers/skopeo/issues/1838

One thing we could do relatively easily today is detect if the host and container are compatible, and copy the skopeo binary to the host if so. This would help a lot of cases, but not all.

vrothberg commented 12 months ago

Assuming bootc install always requires to run inside of podman: should the skopeo functionality be moved to podman such that bootc can use it?

cgwalters commented 12 months ago

Yeah it'd likely make sense to refactor it into a shared library that gets vendored into both projects. It's a really small amount of code and the duplication wouldn't matter too much.

I'm not sure we can really move it though because I know of at least one user outside of this project who is explicitly only depending on skopeo - the podman project is a lot larger.

(It's reasonable to install just skopeo inside a container image e.g. that doesn't need its own full container runtime)

vrothberg commented 11 months ago
~ $ du -h /usr/bin/skopeo 
26M     /usr/bin/skopeo
~ $ du -h /usr/bin/podman
43M     /usr/bin/podman

The size difference isn't too bad given Podman has more features. The thought I had was to reduce overall dependencies assuming Podman is always required on the host.