podman says Error: Can't open display: localhost:10.0 when I try to run xclock in a container with the command
podman run -ti -e DISPLAY --rm -v
~/.Xauthority:/root/.Xauthority:Z localhost/xclockimage
on a Fedora 29 computer.
Longer story
On my laptop running Ubuntu 18.10 I first logged in to another physical machine over ssh.
[erik@laptop ~]$ ssh -X testuser@server.example.com
The server is running Fedora 29 and my user testuser does not have sudo permissions. I then built a container image for the xclock application with the build tool buildah and a Dockerfile.
[testuser@server ~]$ cd ~/test
[testuser@server test]$ cat Dockerfile
FROM fedora
RUN yum -y update
RUN yum -y install xorg-x11-apps && yum clean all
CMD [ "/usr/bin/xclock" ]
[testuser@server test]$ buildah bud -t xclockimage .
but when I try to run it, podman fails with the error message Error: Can't open display: localhost:10.0
[testuser@server ~]$ podman run -ti -e DISPLAY --rm -v
~/.Xauthority:/root/.Xauthority:Z localhost/xclockimage
Error: Can't open display: localhost:10.0
[testuser@server ~]$
Some more information
[testuser@server ~]$ cat /etc/fedora-release
Fedora release 29 (Twenty Nine)
[testuser@server ~]$ podman --version
podman version 1.0.0
[testuser@server ~]$ sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Memory protection checking: actual (secure)
Max kernel policy version: 31
[testuser@server ~]$
(No changes have been made to the SELINUX settings of the server since it was installed)
How do I run an X11 graphical (GUI) application with podman?