allow xhost
xhost +local:*
run container
sudo docker run -it --name gui_ubuntu --net=host -e DISPLAY -v /tmp/.X11-unix ubuntu:18.04 bash
apt update
apt install -y xauth
run gui application
apt install -y firefox
firefox
xhost +local:*
sudo docker run -it --name gui_ubuntu --net=host -e DISPLAY -v /tmp/.X11-unix ubuntu:18.04 bash
apt update
apt install -y xauth
apt install -y firefox
firefox