GUI on Docker π
Task Description π
π GUI container on the Docker
π Launch a container on docker in GUI mode
π Run any GUI software on the container
What is Docker ?
Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels. Because all of the containers share the services of a single operating system kernel, they use fewer resources than virtual machines.
Itβs good practice to create Custom Image using Dockerfile, I used the code as
FROM centos:latest
RUN yum install python36 firefox -y
RUN pip3 install jupyter
Run command to build Image
#docker build -t <tag>:<version> <location of Dockerfile>
Launch a container
We can use the command for running container
#docker run -it β name <container name> β net=host β env=βDISPLAYβ β hostname=containerhost <image>:<version>
After running this command weβll go inside container and also we can verify by hostname of container. now we can directly run gui apps in the container i run firefox for testing.
we can see some warnings here but our app will launch finally.