Running GUI apps within Docker containers
You can also do it with this one-liner:<p>docker run -it --rm -e DISPLAY --net=host -v $XAUTHORITY:/root/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix debian:11-slim<p>Then inside the container, run:<p><pre><code>    apt update
    apt install firefox-esr
    firefox
</code></pre>
Now Firefox runs inside the container but displays on your hosts screen and you can use it right away.