Deprecate `--local` flag (HMS-3792)
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.
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
flake8 failed on line length. Think it should be all good now 🤞
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
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.
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.
@ondrejbudai How does this change affect BIB in Konflux?
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
Thanks! :+1:
Merge conflicts in the queue
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 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/storageand 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.
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.
This PR was closed because it has been stalled for 30+7 days with no activity.
One or two more of the tests needed to pull the containers first, I updated Ondrej's commit with it.