Running FineReader Engine 12 Linux inside a Docker Container

Language:
EN
Product-Line:
FineReader Engine
Platform:
Linux
Version:
12
Type:
Knowledge Base & Support
Category:
Integration
KB-Type:
Tips & How to Information

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

  • You may use ABBYY Licensing Service either inside the container or
  • 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.

You will need:

  • 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 on your machine, as described on the official Docker website.
  2. Download an image of Linux OS to be installed into the container.

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. Create on the machine, where the container is installed, the following folder structure:

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

  3. Install ABBYY FineReader Engine into the /opt/ABBYY/FREngine12 folder.
  4. Copy the installation folder into /abbyy_docker folder.
  5. Copy the installed Java Development Kit into /abbyy_docker/java.
  6. 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.

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

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

  8. Run the container:

    docker run -it abbyyfr

  9. 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
  10. Make sure that the LicensingSettings.xml file in /opt/ABBYY/FREngine12/Bin/ has these settings:

    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.

  11. 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:

  1. Create on the machine, where the container is installed, the following folder structure:

  2. Put Java Development Kit into /java folder.
  3. Put ABBYY FineReader Engine 12 Distributive file (FREngine-Linux-%BUILD_ID%.sh) and an Online License token file into /opt folder.
  4. 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/

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

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

  6. Run the container:

    docker run -it abbyyfr

  7. Install ABBYY FineReader Engine 12 Distributive file into /opt/ABBYY/FREngine12/ folder with the local server activation type and parameters of the Online license.
  8. 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 FineReader Engine 12.

This website uses cookies which enable you to see pages or use other functions of our websites. You can turn off such cookies in your browser’s settings. If you continue to use these pages, you consent to the use of cookies.