Skip to main content

Configure profiles in Docker

For Docker container installations, you need to create a profile using a Windows installation, export it, and import it into your container.

The version of the Conversion Service installed on Windows and the version of the container image must match.

If you need to update to a new version, update the Windows service first as this automatically updates the configured profiles if necessary.

Make sure that all configuration values are valid in your Docker environment, that is, URLs to services and paths to configuration files.

info

Alternatively, configure profiles using the web application Configurator Web. It is in the beta version and doesn’t support all the Windows Conversion Service Configurator capabilities. You can find more information in the Configure profiles using Configurator Web section.

Set a profile when starting the Docker container

The exported profile file (for example, ProfileExport-6.12.0.export, where the version matches Conversion Service that exported it) must be mounted into the container. Set the IMPORT_PROFILES environment variable to the file path inside the container.

Import profiles only

This profile configuration imports the exported profile file only, which is typically sufficient.

Bind the exported profile file to the container and set the environment variable IMPORT_PROFILES to activate the profile import:

docker run -dp 13033:13033 --network conversion-service \
--mount "type=bind,src=HOST_PROFILE_DIR\PROFILE_EXPORT_FILE,\
dst=/etc/convsrv/ProfileExport.export,readonly" \
-e IMPORT_PROFILES=/etc/convsrv/ProfileExport.export \
-e LICENSEKEY=LICENSE_KEY_VALUE \
pdftoolsag/conversion-service:IMAGE_VERSION

Replace the following:

  • HOST_PROFILE_DIR: The directory on the host machine that contains the exported profile (for example, C:\Users\john-doe\Desktop).
  • PROFILE_EXPORT_FILE: The filename of the exported profile (for example, ProfileExport-6.12.0.export).
  • LICENSE_KEY_VALUE: The Conversion Service license key. To use the built-in trial license instead, remove the LICENSEKEY variable.
  • IMAGE_VERSION: The Conversion Service version number (for example, 6.12.0, 6.12, or 6).

When importing profiles of a workflow, you also import the Workflow state, whether the workflow is activated or deactivated.

Import profiles and further configuration files

This more advanced profile configuration is required for profiles that contain references to files, for example, SSL client certificates for connections to external servers.

  1. When configuring the profiles, use the base path /etc/convsrv for all referenced files.
  2. Create a directory configuration where all configuration files can be written to. Later these files will be copied to a volume and mapped to /etc/convsrv in the container.
  3. Copy the exported profile file and all referenced files to the directory configuration.
  4. Create a volume named after the Conversion Service version (for example, convsrv-etc-6.12.0) containing all configuration files from configuration:
docker volume create --name VOLUME_NAME
docker run --rm \
--mount "type=bind,src=HOST_CONFIG_DIR,dst=/source" \
--mount "type=volume,src=VOLUME_NAME,dst=/etc/convsrv" \
alpine \
ash -c "cp /source/* /etc/convsrv/"

Replace the following:

  • VOLUME_NAME: A Docker volume name that includes the Conversion Service version (for example, convsrv-etc-6.12.0).
  • HOST_CONFIG_DIR: The directory on the host machine that contains the exported profile and any referenced files (for example, C:\path\to\configuration).
  1. The folder configuration is not required anymore and can be deleted.
  2. Run the image. Mount the volume and set the environment variable IMPORT_PROFILES to activate the profile import:
docker run -dp 13033:13033 --network conversion-service \
--mount "type=volume,src=VOLUME_NAME,dst=/etc/convsrv,readonly" \
-e IMPORT_PROFILES=/etc/convsrv/PROFILE_EXPORT_FILE \
-e LICENSEKEY=LICENSE_KEY_VALUE \
pdftoolsag/conversion-service:IMAGE_VERSION

Replace the following:

  • VOLUME_NAME: The Docker volume name created in the previous step (for example, convsrv-etc-6.12.0).
  • PROFILE_EXPORT_FILE: The filename of the exported profile (for example, ProfileExport-6.12.0.export).
  • LICENSE_KEY_VALUE: The Conversion Service license key. To use the built-in trial license instead, remove the LICENSEKEY variable.
  • IMAGE_VERSION: The Conversion Service version number (for example, 6.12.0, 6.12, or 6).

Import profiles using Docker Compose

To import an exported profile in a Docker Compose setup, mount the export file as a volume and set the IMPORT_PROFILES environment variable:

services:
conversion-service:
image: pdftoolsag/conversion-service:IMAGE_VERSION
environment:
LICENSEKEY: LICENSE_KEY_VALUE
IMPORT_PROFILES: /etc/convsrv/ProfileExport.export
ports:
- "13033:13033"
volumes:
- ./PROFILE_EXPORT_FILE:/etc/convsrv/ProfileExport.export

Replace the following:

  • IMAGE_VERSION: The Conversion Service version number (for example, 6.12.0, 6.12, or 6).
  • LICENSE_KEY_VALUE: The Conversion Service license key. To use the built-in trial license instead, remove the LICENSEKEY variable.
  • PROFILE_EXPORT_FILE: The filename of the exported profile on your host machine (for example, ProfileExport-6.12.0.export).

For the full Docker Compose configuration reference, refer to Configure containers using Docker Compose.

Configure profiles using Configurator Web

Set up the Conversion Service profiles and workflows in Docker. Use the Configurator Web, a cross-platform application that removes the need to manage configuration on Windows machines.

Configurator Web beta

The Configurator Web is still in beta and does not support all the capabilities of the Conversion Service Configurator on Windows.

Use the following code in your Docker compose YAML configuration file:

volumes:
vol-conversion-srv: {}
services:
conversion-service:
# Conversion Service image. Converts files to PDF format.
image: pdftoolsag/conversion-service:IMAGE_VERSION
volumes:
# Utilizes vol-conversion-srv for configuration files.
- vol-conversion-srv:/var/www/convsrv/bin/config
environment:
# Optional: To convert files without a watermark, pass the value of your full license key.
LICENSEKEY: LICENSE_KEY_VALUE
ports:
# Exposes port 13033 for external communication.
- "13033:13033"
configurator-web:
# Configurator Web image. Configures profiles and workflows.
image: pdftoolsag/configurator-web:IMAGE_VERSION
volumes:
# Utilizes vol-conversion-srv for configuration files.
- vol-conversion-srv:/app/conversion-config
ports:
# Exposes port 13035 for external communication.
- "13035:13035"

Replace the following:

  • IMAGE_VERSION: Specify the image version you want to use. Note that this variable is included twice in the code snippet. Example value: 6.12.0.
  • LICENSE_KEY_VALUE: Pass the license key value. To use the built-in trial license instead, remove the LICENSEKEY variable.

The Configurator Web is available at http://localhost:13035 by default. The example Docker compose file demonstrates how to run the Conversion Service and Configurator Web simultaneously with a shared configuration file.

tip

Once you have configured the profiles in the Configurator Web application:

  1. Click Save.
  2. Restart the Conversion Service container.