Running ABBYY FlexiCapture 12 SDK inside a Docker container
This section provides the instructions on running ABBYY FlexiCapture 12 SDK inside the Docker container. Two alternative scenarios are described: you may use ABBYY Licensing Service either inside the container or outside the container.
An Online License, which connects to *.abbyy.com license server, is used for both cases.
Note: ABBYY Licensing Service can work with only one Online License at the same time.
You need:
- your Customer Project ID
- an Online License token file
- the password to the license token file
You need to fulfill the following conditions for using an Online License wherever ABBYY licensing service is installed:
- Active Internet connection
- Allowed connections to *.abbyy.com on port 443
Before launching the Docker container in which ABBYY FlexiCapture SDK will run, you need to:
- Download and install Docker for Windows on your machine as described on the official Docker website.
- Enable Hyper-V and Containers Windows features.
- Switch to Windows Containers using the Docker desktop menu.
- Download an image of Windows to be installed into the container:
docker pull mcr.microsoft.com/windows/servercore:<tag>
- Create an empty directory and put into it:
- InstallerFolder — a directory with ABBYY FlexiCapture SDK distribution kit
- TestAppFolder — a directory with
- Online License token file
- test application compiled to use this token file as well as the password to it and your Customer Project ID
- DeployFCSDK.cmd — a command-line script to install ABBYY FlexiCapture 12 SDK
- TestFCSDK.cmd — a command-line script to run the test application
- Dockerfile — a file with the settings for the container to be created. This file must contain:
FROM mcr.microsoft.com/windows/servercore:<tag> WORKDIR /app ADD . /app RUN DeployFCSDK.cmd CMD TestFCSDK.cmd
Licensing Service outside the container
ABBYY Licensing Service should be installed outside the container if all containers use one Online License.
Follow the instruction:
- Make sure the network port on a machine with Licensing Service is opened in your firewall security settings (ABBYY Licensing Service uses 3024 port by default).
- Make sure the LicensingSettings.xml file on a machine with Licensing Service contains the following settings:
<LocalLicenseServer>
<ConnectionProtocol ProtocolType="TCP/IP" />
</LocalLicenseServer>
- Use the ABBYY FlexiCapture SDK 12 Runtime (x64).exe file to install ABBYY FlexiCapture 12 SDK at runtime on 64-bit Windows by specifying inside the DeployFCSDK.cmd the following command (the servername parameter is the host address where the Licensing Server is installed):
.\InstallerFolder\"ABBYY FlexiCapture SDK 12 Runtime (x64).exe" /qb /v INSTALLDIR="LibraryInstallationPath" SERVERNAME=<LicensingServer_host_Address> LICENSESRV=No
- To run the test application, specify the following commands inside the TestFCSDK.cmd:
.\<TemplateFolder>\Test.exe
The TestFCSDK.cmd script will be run automatically after launching the container.
- Open the command line and start the container building process:
docker build -t <name>
- Run this command to specify an image to derive the container from after the building process succeeds:
docker run <name>
To make an Online License available for all containers you must run any application which uses this license on a machine with Licensing Service (see Developing online-licensed applications).
If you have a problem connecting to ABBYY Licensing Service, please make sure your LicensingSettings.xml file in LibraryInstallationPath\ folder inside the container has these settings:
<LicensingServers> <MainNetworkLicenseServer ServerAddress="LicensingServer_host_Address" ProtocolType="TCP/IP" /> </LicensingServers>
Licensing Service inside the container
To install the Licensing Service, refer to the Installing the Licensing Service.
Follow the instruction:
- Use the ABBYY FlexiCapture SDK 12 Runtime (x64).exe file to install ABBYY FlexiCapture 12 SDK at runtime on 64-bit Windows by specifying inside the DeployFCSDK.cmd the following command:
.\InstallerFolder\"ABBYY FlexiCapture SDK 12 Runtime (x64).exe" /quiet INSTALLDIR="LibraryInstallationPath"
- To run the test application, specify the following command inside the TestFCSDK.cmd:
.\<TemplateFolder>\Test.exe
The TestFCSDK.cmd script will be run automatically after launching the container.
- Open the command line and build an image from a container:
docker build -t <name>
- Run this command to create a container layer over the image and start it:
docker run <name>
See also
15.08.2023 13:19:30