Closed cdrage closed 2 weeks ago
So, I have a pretty strong opinion that this project should not be implementing its own logic here in the medium/long term but should just be a GUI around a CLI (and maybe that CLI exposes a language API).
There's a lot of related threads on the podman-bootc CLI for this, see: https://github.com/containers/podman-bootc/issues/9
I feel strongly enough about this that I think this issue should be closed as a duplicate of https://github.com/containers/podman-desktop-extension-bootc/issues/166
I agree with @cgwalters. If we get podman-bootc into a state where it can run on Linux without a machine and get the bootc-extension to use podman-bootc, it's a huge win.
Requires some organization and good planning along with commitments to meet deadlines.
So, I have a pretty strong opinion that this project should not be implementing its own logic here in the medium/long term but should just be a GUI around a CLI (and maybe that CLI exposes a language API).
There's a lot of related threads on the podman-bootc CLI for this, see: containers/podman-bootc#9
I feel strongly enough about this that I think this issue should be closed as a duplicate of #166
@vrothberg @cgwalters
For this issue I'm referring to the building image fix / removing the podman machine requirement as Linux builds aren't working right now. Not with regards to running the resulting image in a VM.
From my understanding https://github.com/containers/podman-bootc helps (at the moment) with regards to spinning up the VM / using the resulting built image. From my understanding there's no other features implemented yet (issues opened for them though regarding bib).
I agree that we should get this in medium/long-term, but this issue should focus on the short-term fix of linux builds.
EDIT: I see https://github.com/containers/podman-bootc/pull/58 which is awesome and a lot more new PR's. But I believe again that a temporary fix should go in under we switch 100% to podman-bootc for all build logic across mac / windows / linux.
I would prefer it as a wrapper around a cli too, but I think it would depend on the timeline? i.e. when would podman-bootc support windows and be the preferred approach enough so that pages like https://osbuild.org/docs/bootc/ would change? If that was in the pipe/'soonish' then we should just wait and focus on that, but if not we'll likely need to do something in the meantime.
@germag WDYT?
Another caveat too is how Podman Machine on Podman Desktop is by default root / rootful on macOS and Windows when creating the machine, but non-root on Linux (since it requires no podman machine). From the PR: https://github.com/containers/podman-bootc/pull/58 we will be hardcoding: /var/lib/containers/storage (https://github.com/containers/podman-bootc/pull/58/files#diff-b617e9b9c374b3eb34e1995a6010fadc91cfaa59baba743b40bec8163eec0ed0R158). But bootc-image-builder requires root to function due to filesystem requirements.
What the current workflow looks like:
macOS & Windows:
But the current cycle for Linux is:
podman-bootc
(requires root)~/.local/share/containers/storage
What I'm proposing for Linux is as a short-term fix until we are at 100% feature parity with bib for podman-bootc is:
podman
CLI command with ~/.local/share/containers/storage
passed in, which uses the non-root images they had built (requires root). We already have this code ready-to-go in: https://github.com/containers/podman-desktop/blob/main/packages/extension-api/src/extension-api.d.ts#L4114 TLDR; Linux builds are failing at the moment, due to very old Podman versions on different machines (openSUSE tumbleweed, fedora 40, etc.) using flakey podman machine's and we should fix them with this solution until Linux support is better.
Is your feature request related to a problem? Please describe
Podman Machine is a requirement in order to run this extension which causes inconveniences for Linux users.
It requires us create a separate podman machine, use it, as well as make sure that it also has the correct image too.
There have been numerous cases where Podman Machine isn't detected (it is not officially supported and a hidden feature of PD) and requires PD to be restarted to "use" the podman machine.
Why this is possible now:
There are also other cases:
Describe the solution you'd like
Instead, our extension could use the exec command / process command of PD extension to run a privileged command (https://github.com/containers/podman-desktop/blob/main/packages/extension-api/src/extension-api.d.ts#L4114) and run the following example command:
Note that this is running the SUDO command but uses
$HOME/.local/share/containers/storage/.
for the storage. This means that the user can use podman rootless like normal, but just for building, it will use SUDO.Describe alternatives you've considered
No response
Additional context
No response