This page outlines the solution deployment within Docker containers, focusing on Windows as the host container but applicable to Linux with Mono Framework. It specifies system requirements, including Docker installation, Windows 10 64-bit specifications, Hyper-V, Containers features, and hardware prerequisites. The configuration procedure involves copying necessary runtime files and subfolders to Docker's temporary folder, managing license and argument files for project configuration, and creating a Dockerfile based on a .NET Framework image. Instructions for building and running the Docker image, with considerations for memory, CPU cores, and port settings for external access, are provided. The document is technical, targeting users familiar with Docker, and emphasizes a procedural approach for deploying applications in Docker environments.
On this page:
Framework projects can be deployed to run on Docker containers.
This Document assumes familiarity with Docker.
This page was created using Windows as host container (Docker Desktop WSL 2 backend), but equivalent steps can be used for any Linux with Mono Framework as host container.
To make use of this feature, the following system requirements need to be matched.
After installing Docker and fs-9.1.12, copy the files and subfolders from ”.. fs-9.1” to the Docker’s temporary folder, as in the image.
In the image, the Bin is the temporary folder.
Not all files and subfolders are required, only the ones used in Runtime. The subfolders for DBProviders, Extensions, IoT and Templates are not used in Runtime and do not need to be copied.
The HTML5 subfolder is only necessary if Web Clients will access pages from runtime. DevExpress and Sync- Fusion files are only necessary if Smart Clients will access displays from runtime.
Also, only the protocol drivers used by the project need to be copied (Ex: MODBUS.xml and T.ProtocolDriver.MODBUS.dll). The size of the image depends on which files will be used by the project.
The Project file (.tproj) and all other necessary files (e.g.: vc redist, etc) should also be copied to the temporary folder.
Create a RemoteLicenseService.config file and copy it to the temporary folder. The syntax is:
RemoteServer=<IpAddress>:<PortNumber> // IP:Port where the licensing server is Running RemoteServer=192.168.1.1:3100 |
The licensing server needs to have a license containing a Remote Licenses feature. |
Create an Arguments.config file and copy it to the temporary folder. The syntax is:
/project:C:\App\<DockerTest>.tproj // Project file name (mandatory) /docker // (mandatory) |
This file contains the parameters that will be passed to the FactoryStudio modules (TServer and TRun- Module). These parameters are the same ones used by the TStartup program. |
Create a Dockerfile file based on existent image containing .NET Framework v4.6.2 or higher, (necessary by FramworX). Example:
FROM mcr.microsoft.com/dotnet/framework/runtime WORKDIR /app COPY bin . RUN C:\app\vc_redist.x64.exe /quiet /install RUN C:\app\vc_redist.x86.exe /quiet /install ENTRYPOINT ["TServer.exe", "/args:Arguments.config"] |
Notes on this procedure:
To build the image, execute the following via the CMD command:
docker build -t fs . // dot (.) IS IMPORTANT!!! |
To run the image, execute the following via the CMD command:
docker run --memory=4096m --cpus=4 fs // Min Recommended 4 GB Mem and 4 CPU cores //or specifying the port: docker run -p 3101:3101 fs |
LocalIP is the IP of the Docker image (fs), and it can be used to access the runtime via external clients (Smart and Web) and debugging tools. To get access from other computers of intranet/internet to this docker image please contact your system administrator. |
Locally (host computer) in Web Brower: http://localhost:3101/HTML5 |