Launching GUI apps inside container
By default we can’t launch GUI apps in a container, But by using some enviorment variables we can launch GUI apps inside container.
Lets try running firefox inside a container running fedora:latest image
The DISPLAY variable is used by X11 to identify your display.While launching this container I did not specify any DISPLAY Variable. Without the display variable we can’t run GUI apps inside a container.
Now let’s launch a new container with DISPLAY variable
We are setting here the DISPLAY environment variable
Now let’s install firefox in this container
yum install firefox -y
Now let’s run firefox in this container
Now this time firefox in launched
so using — env we launch our container in GUI mode, and can run GUI apps inside it!!