GUI app inside podman with access to display

Posted on

Hi guys!
Glad to be here!!

to run any gui app inside of podman container you will need to authorize the display first.

$ xhost +"local:podman@" #<- normal user

after this create your normal podman container and execute

FROM ubuntu
RUN apt-get update && apt-get install x11-apps -y
CMD ["/usr/bin/xclock"]

podman build -t gui . # << to create the image


podman run -it -e DISPLAY --rm --net=host --name="namehere" gui # <- to launch

Hope the developers change in future this permission to access display from user to another way like the file system":z" and I really think SELinux need to block this access too,

Some comments from big sharks?