Running ABBYY FineReader Engine 12 inside a Docker container

This section provides the instructions on running ABBYY FineReader Engine 12 inside the Docker container in the scenario of using two containers: the first one with ABBYY FineReader Engine, and the second one with the Licensing Service. Implementing of this scenario increases the fault tolerance and ensures the continuous operation of all containers. If one of the containers fails, you can restart it without interrupting the other.

An Online License, which connects to *.abbyy.com license server, is used for this scenario.

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

You need:

  • 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 (HTTPS)
  • GoDaddy Trusted Root Certification Authority contained in ca-certificates package (see details on the GoDaddy website)

To run ABBYY FineReader Engine 12 in Docker container:

  1. Download and install Docker and Docker Compose on your machine.
  2. Create an empty directory and put into it:
  • Dockerfile_ls — a Dockerfile for container with the Licensing Service (see its listing below)

Important! Dockerfile_ls is intended for building a container that will be working with only one container built from Dockerfile_worker. Do not configure multiple replicas of container with ABBYY FineReader Engine to work with a single Licensing Service.

Note: This container runs the Licensing Service with /standalone key. With this key, the Licensing Service works as a foreground process, which is the best practice for working in Docker containers.

  • Dockerfile_worker — a Dockerfile for container with ABBYY FineReader Engine (see its listing below)
  • wrapper.sh — a command-line script  for running the sample and displaying its results in the console (see its listing below)
  • docker-compose.yml — a configuration of Docker Compose (see its listing below)

Important! Note that for container with ABBYY FineReader Engine, we set the /dev/shm size manually in docker-compose.yml. We recommend setting it to at least 1GB.

  • ABBYY FineReader Engine 12 Distributive file (FREngine-Linux-%BUILD_ID%.sh)
  • Online License token file
  1. Specify the parameters of your license in the following lines of docker-compose.yml:
args:
- license_token=SWRRXXXXXXXXXXXXXXXXXXXX.ABBYY.ActivationToken
- license_password=your_license_password
    
  1. To build and run the containers, use the following command:
docker-compose up
    

The results of sample will be displayed in the console.

Note: You may customize the default arguments of the CommandLineInterface (CLI) code sample by editing the following line of docker-compose.yml:

command: ["-if /app/Demo.tif -f TextUnicodeDefaults -of /app/Test.txt"]
    
    

Dockerfile_ls

Dockerfile_worker

wrapper.sh

docker-compose.yml

12.12.2022 20:26:02

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.