Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

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:

Table of Contents
maxLevel3
stylenone

Overview

Framework projects can be deployed to run on Docker containers.


This Document assumes familiarity with

Docker

.

Images

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.

System Requirements

To make use of this feature, the following system requirements need to be matched.

  • Install Docker.
  • Windows 10 64-bit: Pro, Enterprise, or Education (Build 17134 or later). For Windows 10 Home, see Install Docker Desktop on Windows Home.
  • Hyper-V and Containers Windows features must be enabled.
  • The following hardware prerequisites are required to successfully run Client Hyper-V on Windows 10:

Configuration Procedure

Copying Folders and Runtime Files

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.

Docker folder filesImage Removed

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, IoTand Templatesare not used in Runtime and do not need to be copied.

document provides guidance on using Docker images for deploying applications. Although most of the examples are based on creating Docker images for Linux, these steps are also applicable when using Windows containers, or if the application inside Docker is running on Windows.

Pre-built Docker Images

You do not need to create a new image from scratch, as we provide two ready-to-use images:

1. TWebServices

This image only installs the communication server. You use it by sending the necessary files from another computer via the software itself, connecting to the device, and transferring the files. This allows for upgrading the product without replacing the entire Docker image. 

→ See Docker with TWebServices for more information.

2. Full Product

This image contains all the product files, except for the solution itself. The advantage of this option is that it provides faster setup and easier file management, especially when dealing with a large number of files.

→ See Docker with Full Product for more information.

Custom Docker Generation

The choice of image depends on the scenario, as each has its own advantages. Consider which one is more suitable based on your specific requirements.

If you need to create a custom image, please refer to Custom Docker Generation.


Running the Image

The following information is valid regardless of which image has been loaded into Docker. Ensure to review the running instructions that apply to your setup.

→ Learn more at Running Docker Image.

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.

Copying License and Argument Files

Create a RemoteLicenseService.config file and copy it to the temporary folder. The syntax is:

Code Block
RemoteServer=<IpAddress>:<PortNumber>
// IP:Port where the licensing server is Running RemoteServer=192.168.1.1:3100
Note

The licensing server needs to have a license containing a Remote Licenses feature.

License tab optionsImage Removed

Create an Arguments.config file and copy it to the temporary folder. The syntax is:

Code Block
/project:C:\App\<DockerTest>.tproj // Project file name (mandatory)
/docker // (mandatory)
Note

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.

Creating Docker File

Create a Dockerfile file based on existent image containing .NET Framework v4.6.2 or higher, (necessary by FramworX). Example:

Code Block
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 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.

To build the image, execute the following via the CMD command:

Code Block
docker build -t fs . // dot (.) IS IMPORTANT!!!

Command promptImage Removed

 To run the image, execute the following via the CMD command:

Code Block
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

Command promptImage Removed

Note

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.

Info
titleDisplays Access

Locally (host computer) in Web Brower: http://localhost:3101/HTML5

Image Removed

Image Removed



In this section...

Page Tree
root@parent
spacesV10