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:
Create a folder called “Documents” in the same directory as the Dockerfile, after that create another folder called “FrameworX” inside “Documents” and inside the FrameworX directory, create the last folder called “MachineSettings.”
Inside MachineSettings, create a RemoteLicenseService.config file. The syntax is:
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:
Create an Arguments.config file and copy it to the Bin folder. 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!!! |
To run the image, execute the following command in Command Prompt (CMD):
docker run --memory=4096m --cpus=4 -p 3101:3101 fx (Min Recommended 4 GB Memory and 4 CPU cores) |
Or just specifying the port: docker run -p 3101:3101 fx
If you want to name the container:
docker run --name <container_name> -p 3101:3101 fx
After running the container, go to fx-10 and create a shortcut for TRichClient.exe. Right-click on the TRichClient shortcut → Properties. In the target field, type your IP and the port where the solution is running in the container.
"Path of TRichClient.exe" /ip1:<YOUR_IP> /port1:<PORT> |
To find your IP, open Command Prompt (CMD) and type ipconfig. Copy the IPv4 address from the Ethernet adapter vEthernet (WSL).
Once this is done, click Apply and close the Properties window. Then, click on the TRichClient Shortcut and wait for the solution to open.