Running FineReader Engine 12 for Linux 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.

However, did you know you can leverage these benefits as well, by deploying your application with ABBYY FineReader Engine in containers? This article provides the instructions on running ABBYY FineReader Engine 12 for Linux inside the Docker container. 

If you want to learn hands-on tricks, please watch our recorded webinar on this topic.

Two alternative licensing settings are described:

For both cases, you will need to use an Online License, which will connect to *.abbyy.com license server.

Note: The ABBYY Licensing Service can work with only one Online License at the same time.

To set up the Online License, you will need:

  • Your Customer Project ID
  • Your Online License token file
  • The password to the license token file

For using the Online License, you will need following conditions on the computer, on which the ABBYY Licensing Service is installed:

  • Internet connection is available
  • Connections to *.abbyy.com on port 443 is allowed

Before launching the Docker container in which ABBYY FineReader Engine 12 will run, you need to conduct following steps:

  • Download and install Docker on your machine, as described on the official Docker website.
  • Download an image of Linux OS to be installed into the container.

 

Licensing Service is outside the container

 

If several containers will use one Online License, then ABBYY Licensing Service must be installed outside the container. Follow the instructions:

  • Create on the machine, where the container is installed, the following folder structure:
folder_structure.png

Make sure that the LicensingSettings.xml file on host machine contains the following settings:

lsxml_ls-outside_fre12linux.png

  • Install ABBYY FineReader Engine into the /opt/ABBYY/FREngine12 folder.
  • Copy the installation folder into /abbyy_docker folder.
  • Copy the installed Java Development Kit into /abbyy_docker/java.
  • Create the Dockerfile with the settings for the container to be created (as an example centos7 image is used):

    FROM centos:centos7
    ENV LD_LIBRARY_PATH=/opt/ABBYY/FREngine12/Bin
    ENV JDK=/java
    COPY opt /opt/
    COPY java /java/

    This file also should be in the abbyy_docker folder.

  • Create a Docker image of the abbyy_docker folder using SuperUser Access:

    docker build -t abbyyfr <path to the folder with Dockerfile>

  • Run the container:

    docker run -it abbyyfr

  • Run activatefre.sh activation script inside the container:
    • Select Remote server activation type
    • Enter Customer Project ID for an Online License
    • Do not enter any license parameters
    • Enter the DNS name or IP-address of the host machine with the Licensing Service installed

 

  • Make sure that the LicensingSettings.xml file in /opt/ABBYY/FREngine12/Bin/ has these settings:
lsxml_ls-outside_container_fre12linux.png

 

Important: /var/lib/ABBYY/SDK/12/Licenses folder must be available for reading and writing.

To make an Online License available for all containers you must run on host machine any application which uses this license.

  • Run Hello java sample:
    • Install libgomp library
    • Go to the /opt/ABBYY/FREngine12/Samples/Java/Hello/ folder and run the sample:

      ./build.sh
      ./run.sh

 

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:

  • Create on the machine, where the container is installed, the following folder structure:
folder_structure.png
  • Put Java Development Kit into /java folder.
  • Put ABBYY FineReader Engine 12 Distributive file (FREngine-Linux-%BUILD_ID%.sh) and an Online License token file into /opt folder.
  • Create the Dockerfile with the settings for the container to be created (as an example centos7 image is used):

    FROM centos:centos7
    ENV LD_LIBRARY_PATH=/opt/ABBYY/FREngine12/Bin
    ENV JDK=/java
    COPY opt /opt/
    COPY java /java/

  • Create a Docker image of the abbyy_docker folder using SuperUser Access:

    docker build -t abbyyfr <path to the folder with Dockerfile>

  • Run the container:

    docker run -it abbyyfr

  • Install ABBYY FineReader Engine 12 Distributive file into /opt/ABBYY/FREngine12/ folder with the local server activation type and parameters of the Online license.
  • Run Hello java sample:
    • Install libgomp library
    • Go to the /opt/ABBYY/FREngine12/Samples/Java/Hello/ folder and run the sample:

      ./build.sh
      ./run.sh

For more information please refer to the User Guide of the ABBYY FineReader Engine 12.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.

Recently viewed