This page outlines the solution deployment within Docker containers. It specifies system requirements, including Docker installation. 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.
On this page:
This is the procedure to install the Docker tools in a Windows computer. This page describe the use of the Docker tools in Windows, but the DockerFile created can target either Windows, Linux, or any operating system compatible with .NET 8.
1- Access the download link: Visit the Docker for Windows installation page.
2- Download: On the website, select the Docker Desktop for Windows (x86_64) option to download the latest version of Docker.
3 - Installation: After downloading, run the Docker Desktop Installer.exe file.
4 - Settings during installation:
5 - Finish the installation: Complete the installation by following the on-screen instructions.
6 - Open Docker Desktop: After installation, open Docker Desktop from the Start Menu.
7 - Verify it’s working: When Docker Desktop opens for the first time, it will start automatically. You'll see a Docker icon in the system tray (next to the clock).
1 - Make sure your machine has virtualization enabled in the BIOS/UEFI (required for both WSL 2 and Hyper-V).
2 - You can install WSL 2 directly via PowerShell with the following command if it's not yet configured: wsl --install
After installing Docker and fx-10.0.0, copy the files and subfolders from “net8.0” (Path: fx-10/ net8.0) to a folder called “Bin” (the Bin folder should contain all the platform files from net8.0, including the solution.) that you have created as in the image below:
When deploying using docker, you still can license each device, using the standard licensing procedures, or you can automate the licensing process.
One way to accomplish that is to create a file RemoteLicenseService.config, located in the MachineSettings folder. (We will see later you can customize the location of that folder)
RemoteServer=<IpAddress>:<PortNumber> // IP:Port where the licensing server is Running RemoteServer=192.168.1.1:10108 |
The port should point to the same port as your WebServices (TWebServices) running on the Server computer and you can check in the Server tab of Solutions Manager:
The licensing server needs to have a license containing a Remote Licenses feature:
When deploying high volume of devices, it's possible to embedded a license in the Docker Image, so authorized solutions won't required any additional custom procedure. Contact Sales for more information if you have this scenario. |
The Package.yaml should contain on the startup, to start the TWebServices application.
startup: rootfs: project-server.tar target: ["dotnet /Program/FrameworX/TWebServices.dll"] |
This configuration will activate the TWebService solution when the docker image starts.
It is a recommended procedure also to setup the folder with a non-volatile path, outside the docker container, that shall be used to store solutions and configurations files.
That configuration is on the file custompaths.text located at the binaries folder. Example
Documents=/iox_data/appdata CommonDocuments=/iox_data/appdata CommonApplicationData=/iox_data/appdata |
The text '/iox_data/appdata' should be replace by the path of external storage of you devices. In this example, that is the path for docker images target CISCO routers.
That definitions of CustomPaths redirects the folders of the installation, which in Windows are by default pointing to the following locations:
Optionally, you can create an Arguments.config file and copy it to the binaries folder, to start automatically one solution. The syntax is:
/solution:/Bin/Solution.dbsln // Solution file name (mandatory) /docker //(mandatory) /keepRunning |
The file contains the parameters that will be passed to the FrameworX modules (TStartup and TRun-Modules)
Create a Docker file based on an existing image containing .NET Framework v4.6.2 or higher (required by FrameworX). First of all, check your Windows edition by opening System Information and verifying the OS Name. Alternatively, you can open CMD and type “winver” to verify as well.
If you have Windows Pro or Enterprise, you can follow the example below:
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:
Otherwise, if you have the Windows Home edition:
FROM ubuntu:23.10 ARG DEBIAN_FRONTEND=noninteractive # Update packages RUN apt update RUN apt-get install -y dotnet-runtime-8.0 COPY Bin /Bin COPY Documents /Documents // If you have the Argument.config file CMD ["dotnet", "/Bin/TStartup.dll", "/args:/Bin/Arguments.config"] |
Notes on this procedure:
To build the image, execute the following command in Command Prompt (CMD):
docker build -t fx . // dot (.) IS IMPORTANT!!! |