Antenna House Formatter Docker Image

The Docker image for the Linux 64-bit version of the Antenna House Formatter V7.5 Command-line Interface is available on Docker Hub: Antenna House Formatter V7.5 Docker Image .

The Docker image allows Antenna House Formatter to be deployed in containerized environments. It provides the Formatter command-line interface for automated document formatting and PDF generation.

A valid license file for the Linux version of Antenna House Formatter V7.5 is required to run the software in the container. The Formatter application will not run without a valid license.

Docker images for previous versions, including V7.4, V7.3, V7.2, V7.1, V7.0, and V6.6, are also available from the Antenna House Docker Hub repository .

Version Information

Docker image tags and labels provide version information for Antenna House Formatter. The following examples refer to the V7.5 image repository.

Tags

Images are tagged with version numbers that identify the Formatter release, including maintenance and build numbers. The latest, 7, and 7.5 tags identify the most recently published image in the V7.5 repository.

These tags may be updated when a new maintenance release becomes available. Version-specific tags can be used to select a particular release. For production deployments where reproducibility is important, use an exact build tag or image digest rather than latest.

Antenna House Formatter version Docker tags
latest Major version Major + Point Release Exact build
V7.5 R1 Moves to current V7.5 release 7 7.5 7.5.1 7.5.1.69020
V7.5 MR5 7.5.6 7.5.6.72106
V7.5 MR6 (current example) 7.5.7 7.5.7.72703

Note: latest, 7, and 7.5 currently refer to V7.5 MR6 within the antennahouse/ahfcmd75 repository. They are updated as new maintenance releases are published. The release and exact-build tags select specific images. See the Docker Hub tags page for the latest available version.

Labels

Use docker inspect to display the version information in the Docker image's about label:

$ docker inspect --format='' antennahouse/ahfcmd75:7.5

The output identifies the Formatter version and build installed in the selected image. The reported values depend on the tag pulled.

Pull the Docker image

Pull the image by specifying a repository and tag. Sign in to Docker Hub first if required by your Docker Hub access or rate limits.

Use 7.5 to retrieve the current V7.5 maintenance release. For a reproducible production deployment, use an exact build tag such as 7.5.7.72703, or pin the image by digest. Docker does not update running containers automatically when an image tag changes: pull the newer image and recreate or redeploy the container to upgrade.

Sample “docker pull” command and output:

$ docker pull antennahouse/ahfcmd75:7.5

For an exact version:

$ docker pull antennahouse/ahfcmd75:7.5.7.72703

Image digests and downloaded layers depend on the selected tag and may differ between releases.

License

The Docker image requires an ‘AHFormatter.lic’ license file to be able to run. The Docker container can mount just the license file, or it can mount an ‘etc’ directory that can also include, for example, a custom ‘font-config.xml’ that may refer to custom font files. The custom fonts can be included in or under the mounted ‘etc’ directory or they could be in a separate directory that is mounted in a different location.

The examples below show only how to mount a license file. Other aspects of the Docker command line are covered in other sections.

Mount ‘AHFormatter.lic’

Mount just an ‘AHFormatter.lic’ file in the current directory read-only (with ‘:ro’) as ‘/AHFormatter/etc/AHFormatter.lic’ in the Docker container:

  • Bash:

    docker run -v `pwd`/AHFormatter.lic:/AHFormatter/etc/AHFormatter.lic:ro ...
  • Command Prompt:

    docker run -v %cd%\AHFormatter.lic:/AHFormatter/etc/AHFormatter.lic:ro ...
  • Power Shell:

    docker run -v $PWD/AHFormatter.lic:/AHFormatter/etc/AHFormatter.lic:ro ...

Mount 'AHFormatter.lic'

Mount ‘etc’ directory

Mount an entire ‘etc’ subdirectory of the current directory, possibly with a custom ‘font-config.xml’ and custom fonts that are in a subdirectory of the ‘etc’ directory:

  • Bash:

    docker run -v `pwd`/etc:/AHFormatter/etc:ro ...
  • Command Prompt:

    docker run -v %cd%\etc:/AHFormatter/etc:ro ...
  • Power Shell:

    docker run -v $PWD/etc:/AHFormatter/etc:ro ...

Mount an 'etc' directory

Other files in the ‘etc’ directory are omitted from the graphic only for clarity. The mounted ‘etc’ replaces the entire ‘etc’ directory in the Docker container. The mounted ‘etc’ must contain all of the files and subdirectories that the ‘AHFCmd’ in the Docker container will use, including, for example, the ‘hyphenation’ subdirectory that contains hyphenation dictionaries.

Additional font directories can be mounted at other locations in the Docker container by using additional ‘-v’ parameters on the Docker command line. The ‘font-config.xml’ in the mounted ‘etc’ must refer to font files in their locations in the Docker container, not in their locations on the host computer.

Antenna House Formatter command-line parameters

All of the Antenna House Formatter V7.5 command line parameters may be used. The parameters after the image name on the Docker command line – after ‘antennahouse/ahfcmd75:7.5’ in the following examples – are used as command-line parameters for Antenna House Formatter V7.5.

Command-line parameter arguments that refer to files must refer to locations on the file system of the Docker container, not to locations on the host computer. Access to external resources through network access – for example, to an image or a font file retrieved using HTTP – is dependent on the Docker container being configured with network access.

Examples

These examples omit providing an Antenna House Formatter license file to the Docker container. See the preceding section for how to provide the license file.

Input with no local dependencies

When the input is a single file with no dependencies on any other local file – that is, the input does not refer to any external images, stylesheets, or other files on the file system – then the input can be piped into the container and the output piped to a file on the host computer.

  • Bash:

    docker run -i --rm antennahouse/ahfcmd75:7.5 -d @STDIN -o @STDOUT \
      < hello-world.fo > hello-world.pdf
  • Command Prompt:

    docker run -i --rm antennahouse/ahfcmd75:7.5 -d @STDIN -o @STDOUT ^
      < hello-world.fo > hello-world.pdf
  • Power Shell:

    Binary output redirection through PowerShell can corrupt PDF data in some PowerShell versions. For reliable results, mount an output directory and write the PDF file there, as shown below.

Access to other resources through network access – for example, to an image or a font file retrieved using HTTP – depends on the network access that is configured for the Docker container.

Input with local dependencies

When the input has dependencies on external files on the host file system – for example, the input is an XSL-FO file that uses <fo:external-graphic> – then one or more directories can be mounted on the Docker container.

Read-only directory to STDOUT

When the input and all of its local dependencies are under one directory and all file references are relative references, then the directory containing all of the files can be mounted on the container using the ‘-v’ option. The reference to the input file on the “‘docker run’” command line is to its location on the file system of the Docker container, not to its location on the host computer.

The directory containing the input files can be mounted read-only by adding ‘:ro’ to the ‘-v’ option value.

When the output is a single file, it can be piped to STDOUT.

  • Bash:

    docker run -i --rm -v `pwd`/in:/in:ro antennahouse/ahfcmd75:7.5 \
      -d /in/hello-world.fo -o @STDOUT > hello-world.pdf
  • Command Prompt:

    docker run -i --rm -v %cd%\in:/in:ro antennahouse/ahfcmd75:7.5 ^
      -d /in/hello-world.fo -o @STDOUT > hello-world.pdf

Output to host computer directory

When it is not convenient to direct the Docker output to a file – for example, when the output is multiple PDF volumes or multiple SVG files – the output can be written to a directory on the host computer that is mounted on the Docker container.

  • Bash:

    docker run --rm -v `pwd`/in:/in:ro -v /tmp:/out antennahouse/ahfcmd75:7.5 \
      -d /in/hello-world.fo -o /out/hello-world.pdf
  • Command Prompt:

    docker run --rm -v %cd%\in:/in:ro -v %cd%\out:/out antennahouse/ahfcmd75:7.5 ^
      -d /in/hello-world.fo -o /out/hello-world.pdf
  • Power Shell:

    docker run --rm -v $PWD/in:/in:ro -v $PWD/out:/out antennahouse/ahfcmd75:7.5 `
      -d /in/hello-world.fo -o /out/hello-world.pdf

The previous V7.4 image ran as the non-root ahf user with UID 9999 and GID 9999. Confirm the runtime user and group of the V7.5 image before relying on these numeric IDs. Ensure that the container user has permission to write to any mounted output directory; otherwise Formatter cannot write the output.

Security

Docker requires elevated privileges to run. Ensure that you take adequate precautions to minimize the risks inherent in running a program with elevated privileges.

For security, use a non-root container user when supported. The V7.4 image previously used UID 9999; verify the configured user in the V7.5 image before applying the same permissions. On Linux, the container user must be able to write to mounted output volumes.