Skip to main content
This topic describes how to run ABBYY FineReader Engine 12 inside Docker containers on Linux. There are two setup options covered in this topic: Both setup options support Online Licenses and Local Licenses, and both build on ubuntu:noble (24.04 LTS).

License types

FRE 12 accepts two types of licenses: Online and Local. Both types work in both single-container and two-container setups, but they have different activation and runtime requirements.

Online license

  • Filename pattern: XXXXXXXXXXXXXXXXXXXX.ABBYY.ActivationToken
  • Validates against *.abbyy.com at runtime — every container run needs internet access.
  • Requirements wherever the Licensing Service is installed:
    • Active internet connection
    • Allowed outbound HTTPS (port 443) to *.abbyy.com
    • GoDaddy Trusted Root CA in the system ca-certificates package (already present in ubuntu:noble)
  • Single Licensing Service instance can work with only one Online License at a time.

Local license

  • Filename pattern: XXXX-XXXX-XXXX-XXXX-XXXX-XXXX.ABBYY.LocalLicense
  • Activated at build time during FRE installation, then embedded in the image.
  • Internet not required at runtime — good for air-gapped environments.

Getting started

To use either set-up option in this guide, you will need:
  • Docker and Docker Compose installed (docker compose v2 syntax)
  • ABBYY FineReader Engine 12 Linux installer: FRE*.sh
  • License file (.ABBYY.ActivationToken or .ABBYY.LocalLicense) and password

Setup option 1 — Single container

This option runs the Licensing Service and the FRE worker in one container. The entrypoint starts the Licensing Service in the background, waits briefly for it to come up, runs the CLI sample, prints the output, and cleanly shuts down all processes on exit.Recommended for local testing, demos, and CI jobs where you just want one command to start and stop.

Files

Create an empty directory and add the following files:
  • Dockerfile — builds the combined image (listed below)
  • entrypoint.sh — starts the LS, runs the CLI sample, prints the result (listed below)
  • docker-compose.yml — builds and runs the container (listed below)
  • .env — holds your license filename and password (listed below)

Build and run

  1. Copy your FRE*.sh installer and license file into the directory you created above.
  2. Create a .env file with your license values (see below).
  3. From that directory, run the following command to build the image and start the container:
The CLI sample will processes the bundled Demo.tif using OCR and prints the recognized text to the console.

.env

docker-compose.yml

shm_size: 1g is required. FRE uses POSIX shared memory and the default 64MB /dev/shm is not enough. Do not remove or change this setting.

Dockerfile

This is a two-stage build:
  • Stage 1 uses gcc:8 to install FRE and compile the CLI sample.
  • Stage 2 creates a minimal ubuntu:noble runtime image and copies in the Licensing Service binaries, the FRE runtime, the compiled sample, and the license file.

entrypoint.sh


Setup option 2 — Two containers

This option runs the Licensing Service and the FRE worker in separate containers on a shared Docker Compose network. The worker communicates with the Licensing Service over TCP at ls:3023.Recommended for production deployments. Running the services in separate containers means Docker can restart either one independently if it crashes. It also allows multiple workers to connect to the same Licensing Service.
Do not run multiple worker replicas against a single Licensing Service unless your license permits it. A single Licensing Service instance supports only one Online License at a time.

Files

Create an empty directory and add the following files:
  • Dockerfile_ls — builds the Licensing Service container (listed below)
  • Dockerfile_worker — builds the FRE worker container (listed below)
  • entrypoint.sh — runs the CLI sample in the worker (listed below)
  • docker-compose.yml — wires the two containers together (listed below)
  • .env — holds your license filename and password (same format as Setup 1)

Build and run

  1. Copy your FRE*.sh installer and license file into the directory.
  2. Create a .env file with your license values.
  3. From that directory, run:
Both containers are built and started. The Licensing Service starts first, followed by the worker, which runs the CLI sample against the bundled Demo.tif and prints the result.

docker-compose.yml

A few things to notice:
  • The worker uses depends_on: [ls] so the Licensing Service container will start first.
  • Both services use restart: on-failure allowing them to come back independently.
  • The worker’s service_address build argument is ls:3023 — Docker Compose’s built-in DNS resolves ls to the Licensing Service container.
  • shm_size: 1g is configured on the worker, not the Licensing Service because FRE requires shared memory.

Dockerfile_ls

This is a two-stage build:
  • Stage 1 runs the FRE installer with --skip-local-license-activation to extract the Licensing Service binaries.
  • Stage 2 creates a minimal ubuntu:noble runtime image, exposes port 3023, and runs LicensingService /standalone as PID 1. The /standalone flag keeps the Licensing Service in the foreground, which is the right approach in Docker (a foreground process logs to stdout and exits cleanly when the container is stopped).

Dockerfile_worker

This is a two-stage build:
  • Stage 1 installs FRE with --developer-install and --service-address pointing at the Licensing Service container, then compiles the CLI sample.
  • Stage 2 creates a minimal ubuntu:noble runtime image containing only the FRE binaries, the compiled sample, and the demo image. Because the worker talks to the ls container over the network, No Licensing Service binaries are included.

entrypoint.sh

The worker’s entrypoint is simpler than the single-container version because it does not manage the Licensing Service. The worker simply runs the sample and prints the output.

Customizing the CLI Sample

Both setup options run the same default command in docker-compose.yml:
  • -if — input file
  • -f — output format profile
  • -of — output file
Edit this line to point at a different input, output, or format profile. See the FRE Code Samples Library documentation for the full list of CLI arguments.
To run OCR on your own files, bind-mount a host directory into /app and point -if/-of at files inside it.

Common Issues

The following are known issues that apply to both setup options:
  • shm_size: 1g is mandatory. FRE relies on POSIX shared memory and the default 64MB /dev/shm allocation is not enough. The compose files above already set this on the worker service.
  • The installer and license file must be in the build context. Both Dockerfiles COPY FRE*.sh and the license file — if they are not in the directory you are building from, the build fails immediately. Do not mount the license at runtime. It is activated during the build.
  • Online licenses need network egress from the builder and the runtime. The builder needs it to activate; the runtime Licensing Service needs it to keep validating.
  • Do not commit license files or installers. In source control, add .env, *.ABBYY.*, and FRE*.sh to your ignore list, and do not include them in any published images unless you understand the implications and risks.
  • These examples use ubuntu:noble (24.04 LTS). Previous documentation referred to Ubuntu bionic, which is end-of-life. Package names differ between Ubuntu releases. For example: libgcc-8-dev is now libgcc-s1 and libstdc++-8-dev is now libstdc++6. If you use a different base image, verify the package list accordingly.

See also

Installing the Licensing Service on Linux Licensing Activation