I don't want to be negative but Flatpak is a container runtime specifically designed for GUI apps and Docker isn't.
How to run GUI applications directly in containers
11–20 of 40 posts
Re: How to run GUI applications directly in containers
#12Re: How to run GUI applications directly in containers
#13I don't want to be negative but Flatpak is a container runtime specifically designed for GUI apps and Docker isn't.
I think this depends on your use case. As a dev I would take dockerized gui applications over flatpak all day, as it allows me to quickly add additional packages and networking for example. The possibilities would be endless while all can reside in a small docker-compose stack right in the repository.
Re: How to run GUI applications directly in containers
#14> The source of the GUI application is untrusted, or its safety is uncertain. Afaik Docker doesn't promise security
But the core technologies underlying containers: Namespaces, cgroups, POSIX Capabilties, and SELinux. "Should" provide a level of isolation equivalent to a virtual machine[1].
If you're using a decent container platform like Podman, you should feel relatively good about the application's security and isolation.
[1] https://www.redhat.com/en/blog/how-selinux-separates-contain...
Re: How to run GUI applications directly in containers
#15But the protocol sucks I’ve heard
Re: How to run GUI applications directly in containers
#16I don't want to be negative but Flatpak is a container runtime specifically designed for GUI apps and Docker isn't.
To me flatpack looks like a way achieve application compatibility not security
Re: How to run GUI applications directly in containers
#17 docker run -it --rm -e DISPLAY --net=host -v $XAUTHORITY:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix debian:12-slim
And then run the GUI app in the container? For example for Firefox: apt update
apt install firefox-esr
firefox
That is an approach I sometimes use to try GUI applications in a Docker container.Re: How to run GUI applications directly in containers
#18Re: How to run GUI applications directly in containers
#19Is this solution different from just executing this: docker run -it --rm -e DISPLAY --net=host -v $XAUTHORITY:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix debian:12-slim And then run the GUI app in the container? For example for Firefox: apt update apt install firefox-esr firefox That is an approach I sometimes use to try GUI applications in a Docker container.
Re: How to run GUI applications directly in containers
#20- can it run games?
- can it use desktop environments or window managers like KDE or Hyprland?
- how much does it affect performance?
edit: fixed lines