Creating fedora container runtime as seen in flatpak module #72
Replies: 6 comments 3 replies
-
|
Diskspace is definitely an issue with container images and I wonder if using such fat image would really help. Here are some options and future improvements to address that issue:
function buildah_install {
IMG=$1; shift; mkdir -p ~/.cache/buildah-dnf
CTX=$(buildah from --pull-never --volume ~/.cache/buildah-dnf/:/var/cache/dnf:Z $IMG)
buildah run $CTX dnf install -y $@
buildah commit --rm $CTX $IMG
}
buildah_install registry.fedoraproject.org/fedora:latest mesa-dri-drivers gtk4
Also, note that podenv can do inplace update, e.g. when running One major improvement I'd like to investigate is to use libostree instead of containers/image. That way we could use rpm-ostree configuration directly inplace of Containerfile, or perhaps even use existing flatpak image, but with podman. I think this is the best solution moving forward, and we just need to figure out how to setup the rootfs so that podman can use it (e.g. Another alternative would be to simply support a In any case, note that podenv application runtime is an union (e.g. sum type) defined as: https://github.com/podenv/hub/blob/main/schemas/Runtime.dhall . The plan being to be able to support other runtimes, for example, ideally, it could be defined as: < Image : Text
| Nix : Expr
| Container : Containerfile
| RootFS : FilePath
| Ostree : Commit
| RpmOstree : Configuration
>Where |
Beta Was this translation helpful? Give feedback.
-
|
For the second question, we can implement modulemd or (rpmostree yaml) configuration using dhall expressions, either through automatic conversion with |
Beta Was this translation helpful? Give feedback.
-
|
Somewhat in the same vein, I think it would be cool/fun to be able This way a user could run the host system's programs outside their home environment say for example. |
Beta Was this translation helpful? Give feedback.
-
|
It is probably worth mentioning that flatpak also supports OCI runtimes and app images nowadays, in addition to ostree. eg registry.fedoraproject.org/f35/flatpak-runtime |
Beta Was this translation helpful? Give feedback.
-
|
I wonder how flatpak layers those OCI runtimes. This week end I tried using flatpak for blender (as the fedora rpm doesn't seem to support ffmpeg) and I discovered it can run in $ flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
$ flatpak --user install flathub org.blender.Blender
$ flatpak --user run org.blender.BlenderThis creates a local ostree repository in ~/.local/share/flatpak/repo, which I tried to use to assemble the application rootfs, unfortunately without success. Here are some notes: $ cd ~/.local/share/flatpak
$ ostree --repo=repo refs
$ ostree --repo=repo -U checkout deploy/app/org.blender.Blender/x86_64/stable ./test-rootfsThis create I think it would be interesting to dig more the flatpak internals and evaluates how complicated it is to recreate the bwrap mount location manually. Perhaps it would be useful to contribute a Another solution would be to wrap |
Beta Was this translation helpful? Give feedback.
-
|
Note that until we can cleanly compose the image using ostree reference, here is a solution implemented in the hub where the applications can now |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Fedora flatpaks are built using the fedora base image with sensible defaults found here:
Is it work creating one based on that to save some disk space when building podenv application based on fedora ?
Looks like dhall could handle that YAML conversion directly from flatpak-common.yaml ?
Beta Was this translation helpful? Give feedback.
All reactions