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, i.e. 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 file ProfileExport-‹x›.‹y›.‹z›.export (where ‹x›.‹y›.‹z› is the version number of the service) containing the exported profiles must be made available in the container. To import the profiles on service startup, you need to set the IMPORT_PROFILES environment variable.

Import profiles only

This simple profile configuration imports the file ProfileExport-‹x›.‹y›.‹z›.export only, which is typically sufficient.

Bind ProfileExport-‹x›.‹y›.‹z›.export 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=C:\path\to\ProfileExport-3.11.0.export,\
dst=/etc/convsrv/ProfileExport.export,readonly" \
-e IMPORT_PROFILES=/etc/convsrv/ProfileExport.export \
-e LICENSEKEY=4H-V4-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX \
pdftoolsag/conversion-service:3.11.0

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, e.g. 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 ProfileExport-‹x›.‹y›.‹z›.export and all references files to the directory configuration.
  4. Create a volume \convsrv-etc-‹x›.‹y›.‹z› containing all configuration files from configuration:
docker volume create --name convsrv-etc-3.11.0
docker run --rm \
--mount "type=bind,src=c:\path\to\configuration,dst=/source" \
--mount "type=volume,src=convsrv-etc-3.11.0,dst=/etc/convsrv" \
alpine \
ash -c "cp /source/* /etc/convsrv/"
  1. The folder configuration is not required anymore and can be deleted.
  2. Run the image. Mount the volume \convsrv-etc-‹x›.‹y›.‹z› and set the environment variable IMPORT_PROFILES to activate the profile import:
docker run -dp 13033:13033 --network conversion-service \
--mount "type=volume,src=convsrv-etc-3.11.0,dst=/etc/convsrv,readonly" \
-e IMPORT_PROFILES=/etc/convsrv/ProfileExport-3.11.0.export \
-e LICENSEKEY=4H-V3-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX \
pdftoolsag/conversion-service:3.11.0

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:
# To activate the license, pass the value of the license key.
LICENSEKEY: LICENSE_KEY_VALUE
# Pass the URL of the Licensing Gateway Service endpoint
LICENSINGSERVICE: LICENSING_SERVICE_ENDPOINT
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 above. Example value: 6.0.0.
  • LICENSE_KEY_VALUE: Pass the license key value.
  • LICENSING_SERVICE_ENDPOINT: Pass the URL of the Licensing Gateway Service endpoint.

The Configurator Web is available at http://localhost:13035 by default. The example Docker compose file demonstrates how to run the Conversion Service and Web Configurator 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.