Overview

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:


Docker Tools Installation 

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:

  • During the installation process, you'll see a configuration screen.
  • Make sure to either check or uncheck the Use WSL 2 instead of Hyper-V option, depending on your preference:
    • WSL 2 (Windows Subsystem for Linux): This is the recommended option as it provides better performance and compatibility.
    • Hyper-V: If you prefer to use Hyper-V (for example, if you're already using it for other VMs), uncheck this option.

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).

  • To verify if Docker is installed correctly, open PowerShell or Command Prompt and run the following command: docker --version

Additional Considerations:

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


Configuration Procedure

Copying folders and Runtimes Files

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:



Copying License and Arguments Files

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)


Creating the Docker File

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:

  • Image from “microsoft.com/dotnet/framework/runtime” is used as the initial image.
  • In this example, all files from the temporary folder (Bin) will be copied to the “App“ folder (on image).
  • 3 VC redist files will be installed via the RUN command.
  • TServer will be executed using the parameters defined in the Arguments.config file.


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:

  • Starts creating the image based on the official Ubuntu 23.10 image.
  • Sets the DEBIAN_FRONTEND environment variable to noninteractive.
  • It updates the indexes of the available packages. This is done to ensure that the system has the latest information about the packages and can download the latest version of each one.
  • Installs the .NET 8.0 runtime in the container. The -y indicates that the command should automatically answer “yes” to any confirmation prompts that may appear during the installation.
  • Copies the Bin directory from the local system to the /Bin directory in the container.
  • Copies the Documents directory from the local system to the /Bin directory in the container.
  • Defines the default command that will be executed when the container starts.

To build the image, execute the following command in Command Prompt (CMD):

Built Command, Attention to the Dot symbol

docker build -t fx . // dot (.) IS IMPORTANT!!!





In this section...

  • No labels