Question
How to run FineReader Engine 12 for Windows inside a Docker container?
Answer
This article provides the instructions on running FineReader Engine 12 inside the Docker container. Two alternative licensing settings are described:
-
Using Licensing Service inside the container
-
Using Licensing Service on the host machine outside the container
An Online License, which connects to *.abbyy.com license server, is used for both cases.
Note: Licensing Service can work with only one Online License at the same time.
Please prepare:
-
Customer Project ID
-
an Online License token file
-
the password to the license token file
For using an Online License, the following conditions have to be met:
-
Active Internet connection.
-
Allowed connections to *.abbyy.com on port 443.
Before launching the Docker container in which FineReader Engine 12 will run, the following needs to be prepared:
-
Download and install Docker for Windows on the machine, as described on the official Docker website.
Important: During the installation, select the “Use Windows Containers” option. -
After installation, if Windows Containers are not installed by default, install them.
-
Switch to the Windows Containers by right-clicking on the Docker icon in the Windows tray.
-
Download an image of Windows to be installed into the container:
docker pull mcr.microsoft.com/windows/servercore:Windows_version_number
-
Create an empty directory and put into it:
-
InstallerFolder — a directory with FineReader Engine 12 distribution kit
-
TestAppFolder — a directory with the application (let us call it Test.exe), which will be using ABBYY FineReader Engine 12 library
-
TestFRE.cmd — a command-line script to install FineReader Engine 12 and run the Test.exe application
-
Dockerfile — a file with the settings for the container to be created. This file must contain:
FROM mcr.microsoft.com/windows/servercore:Windows_version_number
WORKDIR /app
ADD . /app
CMD TestFRE.cmd
-
Licensing Service is outside the container
If all containers use one Online License, then the Licensing Service must be installed outside the container.
Follow the instructions:
-
Make sure that the network port on the host machine is opened in the firewall security settings. Licensing Service uses 3022 port by default.
- Make sure that the LicensingSettings.xml file on the host machine contains the following settings:
<LocalLicenseServer>
<ConnectionProtocol ProtocolType="TCP/IP" />
</LocalLicenseServer> -
Specify inside the TestFRE.cmd the following commands:
-
Installing FineReader Engine 12 into the container:
.\InstallerFolder\setup.exe /qb /v INSTALLDIR=“LibraryInstallationPath” SERVERNAME=<Host_IP_address> LICENSESRV=No
-
Running the Test.exe application:
.\TemplateFolder\Test.exe
After launching the container, the TestFRE.cmd script will be run automatically.
-
-
Open the command line and start the process of the container building:
docker build -t <сontainername> .
- After the building process succeeds, run the container:
docker run <containername>
To make an Online License available for all containers, please run on the host machine any application which uses this license (for more information, see the article “Developing online-licensed applications” in the User Guide of the FineReader Engine 12).
If there is a problem with connecting to Licensing Service, please make sure that LicensingSettings.xml in LibraryInstallationPath\Bin\ folder inside the container has these settings:
<LicensingServers>
<MainNetworkLicenseServer ServerAddress="computername" ProtocolType="TCP/IP"/>
</LicensingServers>
Please note, if the LicensingSettings.xml is modified, there is a need to restart Licensing Service in order to apply the changes. This can be done by using the Restart menu option in the Services standard application.
Licensing Service is inside the container
If each container uses an Online License of its own, then the Licensing Service must be installed inside the container.
Follow the instructions:
-
Specify inside the TestFRE.cmd the following commands:
-
Installing FineReader Engine 12 into the container:
.\InstallerFolder\setup.exe /qb /v INSTALLDIR=“LibraryInstallationPath”
-
Running the Test.exe application:
.\TemplateFolder\Test.exe
After launching the container, the TestFRE.cmd script will be run automatically.
-
-
Open the command line and start the process of the container building:
docker build -t <сontainername> .
-
After the building process succeeds, run the container:
docker run <containername>
For more information, please refer to the User Guide of the FineReader Engine 12.
Comments
0 comments
Please sign in to leave a comment.