1. download and install DockerDesktop from “https://www.docker.com/products/docker-desktop/”.
2. download the Dockerfile(Download) and save it in a subfolder “qhmiruntime” .
3. change to the directory in which the “qhmiruntime” subdirectory is located.
4. create the container via docker build with the following syntax: docker buildx build [Namen des Ordners mit dem dockerfile] -t [Namen der Instanz]
docker buildx build qhmiruntime -t qhmi_lynx
5 For the creation, some steps such as downloading the base (here Ubuntu), updating the system and installing additional components as well as the files for the QuickHMI runtime are carried out. Depending on the system environment, this step can take up to 10 minutes.
6. create and start a new instance of the container:
docker run -d -p 2222:22 -p 6068:6068 qhmi_lynx
7 When a container is created or executed, not all ports are forwarded to the outside world, which is why the “-p” option is used to create a mapping of the container’s ports with the host system. In our example, port 2222 of the Docker host is mapped to port 22 of the container and port 6068 is mapped to port 6068 of the host.
Note: Please note that the port 6068 used here is the standard port for QuickHMI Lynx projects. If you have configured a different port for your project or want to publish several projects in this container, the ports must be specified accordingly.
8. with docker ps can be used to check whether the container is running and which ports are being passed to the outside.
9. access to the running container with ssh: port 2222, user “root” with password “root123”. The easiest way to transfer files is with the “WinSCP” tool.
10. with docker stop [ContainerID] the container can be stopped, with docker start [ContainerID] started accordingly. Instead of the ID of the container, the name of the container can also be used; automatic naming can be done with the “–name” option. Defining a name can be a practical way of giving a container a meaning.
11 To change or add the ports, you can stop the container with docker stop [container_name] , then remove it with docker rm [container_name] and finally start a new container with the docker run command (as described above) to start a new container with the updated port assignments.
