Skip to content

Get rid of Linux Podman Machine requirement and instead run escalated privileged CLI command. #623

Closed
@cdrage

Description

@cdrage

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:

  • BIB does not require us to "pull" the image (can pass in directory) now
  • We already have functions to "generate" the podman CLI code that would be ran.

There are also other cases:

  • Much faster, runs local not on VM
  • Podman Machine on Linux isn't "officially" supported and there may be bugs
  • Does not align with bib / osbuild team with regards to their development / they do not test on podman machine
  • Issues arise with cumbersome steps for setup.

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:

sudo podman run \
  --name httpd-bootc-image-builder \
  --tty \
  --privileged \
  --security-opt label=type:unconfined_t \
  -v /home/testuser/bootc/test123:/output/ \
  -v $HOME/.local/share/containers/storage:/var/lib/containers/storage \
  --label bootc.image.builder=true \
  quay.io/centos-bootc/bootc-image-builder:latest-1720185748 \
  quay.io/bootc-extension/httpd:latest \
  --output \
  /output/ \
  --local \
  --type \
  raw \
  --target-arch \
  amd64

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

Metadata

Metadata

Assignees

Labels

kind/feature 💡Issue for requesting a new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions