Document Validation Quick Start for Docker

Welcome! This guide will help you install, configure, and run Document Validation using Docker.

System Requirements

Document Validation for Docker was built and tested using Docker 24.0.6 on Ubuntu 22.04.2 LTS.

Accessing the Docker Image

You may receive the Docker image in one of two ways:

Option 1: Docker Hub Credentials

If you received a username and access token, use the following command to log in:

docker login --username awareaccess
Password: <paste-your-access-token-here>

You can then pull down the latest release:

docker pull awareknomi/document_validation

Or a specification version by appending the version number to the image name:

docker pull awareknomi/document_validation:1.1.0

Once pulled in, skip to the configuration

Configuration

Document Validation accepts environment variables to control its behavior.

Available Environment Variables

Variable

Description

DOCUMENTVALIDATION_REGULARURL

(Required) URL of the Regula server.

DOCUMENTVALIDATION_LOGREQUESTS

Enable/disable logging of requests. Values: true (default) or false.

DOCUMENTVALIDATION_LOGREQUESTSDIRECTORY

Directory to store logs. Default: logs/request.

Example Usage

docker run \
  --env DOCUMENTVALIDATION_REGULARURL=https://document.aware-demos.com \
  --env DOCUMENTVALIDATION_LOGREQUESTS=true \
  --env DOCUMENTVALIDATION_LOGREQUESTSDIRECTORY="logs/requests" \
  ...

Running the Docker Image

Use the following command to run the container:

docker run \
  -p 8095:8080 \
  --volume ./logs:/logs \
  --detach \
  --restart always \
  --name document_validation \
  --env DOCUMENTVALIDATION_REGULARURL=https://document.aware-demos.com \
  awareknomi/document_validation

Breakdown of the Command

  1. docker run: Runs a new container.

  2. -p 8095:8080: Maps host port 8095 to container port 8080.

  3. --volume ./logs:/logs: Mounts host ./logs directory to /logs inside the container.

  4. --detach: Runs the container in the background.

  5. --restart always: Ensures the container restarts automatically.

  6. --name document_validation: Names the container.

  7. --env DOCUMENTVALIDATION_REGULARURL=...: Passes the Regula server URL.

  8. awareknomi/document_validation: Specifies the image to use (built or pull from Docker Hub).

Verifying the Deployment

Check that the container is running:

docker ps

View application logs:

docker logs document_validation

Test the application:

curl http://localhost:8095/documentValidation/version

You should receive a version response confirming the service is active.