Running FineReader Engine 12 for Windows inside a Docker Container

Containerization technology

Advantages of containerization technology are obvious: Hardware cost savings, IT efficiency, faster deployment and better performance of applications through greater scalability options, and more.

But did you know you can leverage these benefits as well, by deploying your application with ABBYY FineReader Engine in containers?

Learn even more in our recorded webinar:

How to deploy FineReader Engine in a container >

This article provides the instructions on running ABBYY FineReader Engine 12 inside the Docker container. Two alternative licensing settings are described:

  • Using ABBYY Licensing Service inside the container
or
  • Using ABBYY 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: ABBYY Licensing Service can work with only one Online License at the same time.

 

Please prepare:

  • your Customer Project ID
  • an Online License token file
  • the password to the license token file

For using an Online License, you need to fulfill the following conditions where ABBYY Licensing Service is installed:

  • Active Internet connection.
  • Allowed connections to *.abbyy.com on port 443.

Before launching the Docker container in which ABBYY FineReader Engine 12 will run, you need some preparation:

  1. Download and install Docker for Windows on your machine, as described on the official Docker website.
    Important: During the installation select the “Use Windows Containers” option.
  2. After installation, if Windows Containers are not installed by default, install them.
  3. Switch to the Windows Containers by right clicking on the Docker icon in the Windows tray.
  4. Download an image of Windows to be installed into the container:

    docker pull mcr.microsoft.com/windows/servercore:Windows_version_number

  5. Create an empty directory and put into it:
    1. InstallerFolder — a directory with ABBYY FineReader Engine 12 distribution kit
    2. TestAppFolder — a directory with the application (let us call it Test.exe), which will be using ABBYY FineReader Engine 12 library
    3. TestFRE.cmd — a command-line script to install ABBYY FineReader Engine 12 and run the Test.exe application
    4. 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 will use one Online License, then ABBYY Licensing Service must be installed outside the container.

Follow the instructions:

  1. Make sure that the network port on your host machine is opened in your firewall security settings. ABBYY Licensing Service uses 3022 port by default.
  2. Make sure that the LicensingSettings.xml file on host machine contains the following settings:

    lsxml_ls-outside.png

  3. Specify inside the TestFRE.cmd the following commands:
    • Installing ABBYY FineReader Engine 12 into the container:

      .\InstallerFolder\setup.exe /qb /v INSTALLDIR=“LibraryInstallationPath” SERVERNAME=<Your_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.

  4. Open the command line and start the process of the container building:

    docker build -t <сontainername> .

  5. After the building process succeeds run the container:

    docker run <containername>


    To make an Online License available for all containers, you must run on host machine any application which uses this license (for more information see the the article “Developing online-licensed applications” in the User Guide of the FineReader Engine).
    If you have a problem connecting to ABBYY Licensing Service, please make sure that your LicensingSettings.xml in LibraryInstallationPath\Bin\ folder inside the container has these settings:

    lsxml_ls-outside_container.png

    Please note, if you modify LicensingSettings.xml, you may need to restart ABBYY Licensing Service using the Restart menu option in the Services standard application.

 

Licensing Service is inside the container

If each container will use an Online License of its own, then ABBYY Licensing Service must be installed inside the container.

Follow the instructions:

  1. Specify inside the TestFRE.cmd the following commands:
    • Installing ABBYY 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.

  2. Open the command line and start the process of the container building:

    docker build -t <сontainername> .

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

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.