How to run a containerized GUI application

podman

#1

Hello.
There is an “official” way to run a program that need the desktop environment, using podman on Silverblue?
I’ve seen some examples using docker, but they talk about X11 and not Wayland.


#2

Just as a reference, in this way I was able to start xclock (X11, not wayland).

vi Doeckerfile
FROM fedora:latest
RUN  dnf -y update
RUN  dnf -y install xorg-x11-apps
podman build --tag fedora:Base -f ./Doeckerfile

Then, running the container, I don’t know if the SELinux part is ok.

podman run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw --security-opt label=type:container_runtime_t --user=$(id -u):$(id -g) -rm -ti fedora:Base /usr/bin/xclock

#3

Check this out:

These are optimized for Ubuntu, but most of them will wil on fedora. Have fun!


#4

Just use Flatpak?


#5

If you want a development environment that replicates an RPM based OS, then try fedora-toolbox that uses OCI containers, podman and buildah underneath. You can run GUI programs from within it.


#6

Oh. I mean non flatpaked applications, of course. :slightly_smiling_face: