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

Drop host requirement on skopeo #81

Closed
cgwalters opened this issue Mar 18, 2023 · 3 comments · Fixed by #286
Closed

Drop host requirement on skopeo #81

cgwalters opened this issue Mar 18, 2023 · 3 comments · Fixed by #286
Labels
area/install Issues related to `bootc install`

Comments

@cgwalters
Copy link
Collaborator

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 containers/skopeo#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.

@cgwalters cgwalters added the area/install Issues related to `bootc install` label Mar 18, 2023
@vrothberg
Copy link
Member

vrothberg commented Nov 6, 2023

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
Copy link
Collaborator Author

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
Copy link
Member

~ $ 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.

cgwalters added a commit to cgwalters/bootc that referenced this issue Jan 26, 2024
I just keep hitting the host skopeo requirement in corner cases;
it's annoying because *otherwise* the container is self-sufficient.
Change our installation instructions to add a `/var/lib/containers`
bind mount.

For the time being of course we continue to support forking off
`skopeo` on the host.

One thing I still want to investigate is dropping some requirements
here and switch to *dynamically* setting up the mount points
inside the container as is mentioned in https://brauner.io/2023/02/28/mounting-into-mount-namespaces.html
but this currently requires relatively new host kernels.

As far as test coverage, this changes the Github Action that
uses ubuntu and needed to build a newer skopeo to stop doing
that, and in fact we explicitly *remove* skopeo to verify
it's not being used in the install process.

I didn't change the other install tests to verify they keep
working.

Closes: containers#81
Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this issue Jan 26, 2024
I just keep hitting the host skopeo requirement in corner cases;
it's annoying because *otherwise* the container is self-sufficient.
Change our installation instructions to add a `/var/lib/containers`
bind mount.

For the time being of course we continue to support forking off
`skopeo` on the host.

One thing I still want to investigate is dropping some requirements
here and switch to *dynamically* setting up the mount points
inside the container as is mentioned in https://brauner.io/2023/02/28/mounting-into-mount-namespaces.html
but this currently requires relatively new host kernels.

As far as test coverage, this changes the Github Action that
uses ubuntu and needed to build a newer skopeo to stop doing
that, and in fact we explicitly *remove* skopeo to verify
it's not being used in the install process.

I didn't change the other install tests to verify they keep
working.

Closes: containers#81
Signed-off-by: Colin Walters <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/install Issues related to `bootc install`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants