Microservice: Firefox Web Browser¶
The following section describes how to integrate a containerized Firefox web browser. These instructions assume an existing ECI installation and familiarity with building Docker containers.
Building: Firefox Container¶
The following section is applicable to:

The following steps detail how to build a Docker image which contains a Firefox web browser.
If not already completed, follow section Prepare the Build System for Microservices to prepare the build system.
Open a terminal on the build system and navigate to the extracted
Dockerfiles
directory. The contents of this directory should be as follows:$ ls application-containers bpf display-containers softplc-containers
Navigate to the
application-containers
directory. The contents of this directory should be as follows:$ ls ec-protocol-bridge tsn-vnet-txtime-assisted web-browser
Navigate to the
web-browser
directory. The contents of this directory should be as follows:$ ls Dockerfile README.md start.sh
Build the Firefox web browser container by performing the following command:
$ docker build -t web-browser-firefox:v1.5 .
Note
The “.” at the end of the command is intentional.
Save the Docker image as a tar archive by performing the following command:
$ docker save -o web-browser-firefox.tar web-browser-firefox:v1.5
After the save has completed successfully, there will be a tarballed Docker image:
Docker Image archive name
Description of Docker Image
web-browser-firefox.tar
Docker image which contains a Firefox web browser.
Executing: Firefox Container¶
The following section is applicable to:

Ensure that the Docker daemon is active. Run the following command to restart the Docker daemon.
Warning
All running Docker containers will also restart.
$ systemctl restart docker
The status of the Docker daemon can be verified with the following command:
$ systemctl status docker
Copy the Docker image created earlier to the target system.
Load the copied Docker image by performing the following command:
$ docker load < web-browser-firefox.tar
Check which Docker images are present on the target system with the following command:
$ docker images
The Firefox web browser image that was loaded should be present in the list. Note the name and tag of the image for use in the following steps.
For example, on our system the output is as follows:
$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE web-browser-firefox v1.5 ea58e13f6cd4 7 seconds ago 660MB
It is a precondition that the display server container
display-server-xorg
runs before starting this one, otherwise the web browser application cannot start. The web browser will communicate with the display server through a file socket under/tmp
, this is why/tmp
is mounted into this container with-v /tmp:/tmp
.--device /dev/dri
allows access to the GPU through the DRI interface as Linux device.Run the container by performing the following command:
$ docker run -d --rm \ --name web-browser \ --device /dev/dri \ -v /tmp:/tmp \ web-browser
Per default the web browser opens a blank window. A specific URL can be opened automatically at startup by calling
docker run
with the extra parameter-e URL=<URL>
. For example, to display the visualizer provided by a CODESYS workload running locally, use:-e URL=http://localhost:8080
.
