bootc-image-builder icon indicating copy to clipboard operation
bootc-image-builder copied to clipboard

Deprecate `--local` flag (HMS-3792)

Open kingsleyzissou opened this issue 1 year ago • 11 comments

Pulling container images before building would break in the case of authenticated images on podman machine, since the auth file lives on the host and podman machine and won't know about it.

This commit deprecates the --local flag and puts the requirement on the user to ensure that the container is in local storage before initiating the build.

kingsleyzissou avatar May 07 '24 13:05 kingsleyzissou

Arghhh of course this breaks tls-verify, how do we want to handle that? We aren't resolving containers from remote registries anymore, so maybe we want to disable this too

kingsleyzissou avatar May 07 '24 15:05 kingsleyzissou

flake8 failed on line length. Think it should be all good now 🤞

kingsleyzissou avatar May 08 '24 10:05 kingsleyzissou

Okay it's finally green now. Removing the flag also broke the cross-arch integration tests :/ Simple PR but had so many knock-on effects

kingsleyzissou avatar May 08 '24 15:05 kingsleyzissou

This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jun 16 '24 04:06 github-actions[bot]

This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jul 19 '24 04:07 github-actions[bot]

@ondrejbudai How does this change affect BIB in Konflux?

achilleas-k avatar Jul 29 '24 14:07 achilleas-k

Thanks, this looks good, small suggestions inline still more nit-picky, happy to approve.

Thanks! I think the changes are good to do here, especially hiding the flags. So I'll do that and ping you for a review

kingsleyzissou avatar Sep 11 '24 15:09 kingsleyzissou

Thanks! :+1:

ondrejbudai avatar Sep 17 '24 09:09 ondrejbudai

Merge conflicts in the queue

achilleas-k avatar Sep 17 '24 17:09 achilleas-k

Hi! So I'm currently using bootc-image-builder and am purposely not using --local, and being forced to use --local would break the tool for me.

More specifically, on my build computer I set the graphroot in storage.conf to a directory on a separate very large SSD from /, since the SSD I use for / is somewhat small. This means I don't have any images in /var/lib/containers/storage, and I don't want to; I don't have enough storage there. bootc-image-builder hard codes looking in /var/lib/containers/storage when looking for/building manifests though. To workaround this, I tried mounting the host's graphroot in the bootc-image-builder container under /var/lib/containers/storage, but that didn't work because I guess there is some db in that directory that is aware of what directory its in, and when the directories don't line up, podman get grumpy.

If you remove the local option, would you be willing to also find the places where the graphroot is assumed to be /var/lib/containers/storage and provide an option to override it?

EDIT: Thanks for this great tool and bootc in general, it really is a great way to build the custom images I want for my application, while still being able to take advantage of all the benefits of a full Linux Distro.

jpace121 avatar Oct 13 '24 19:10 jpace121

@jpace121 I think your use case can be solved by mounting both into the bootc-image-builder container.

podman run -v /var/lib/containers:/var/lib/containers -v /path/to/large/ssd/container/storage:/path/to/large/ssd/container/storage ...

Can you see if that works?

The /var/lib/containers mount should make BIB pick up the storage.conf and point it to the large container storage, which will be at the expected location inside the container.

If you remove the local option, would you be willing to also find the places where the graphroot is assumed to be /var/lib/containers/storage and provide an option to override it?

If the path that graphroot points to isn't mounted in the container, there's not much we can do from inside the container itself to reach it automatically. Unless I'm misunderstanding the suggestion.

achilleas-k avatar Oct 14 '24 07:10 achilleas-k

This PR is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days.

github-actions[bot] avatar Nov 14 '24 04:11 github-actions[bot]

This PR was closed because it has been stalled for 30+7 days with no activity.

github-actions[bot] avatar Nov 21 '24 04:11 github-actions[bot]

One or two more of the tests needed to pull the containers first, I updated Ondrej's commit with it.

kingsleyzissou avatar Jan 24 '25 22:01 kingsleyzissou