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
Option 2: Download Link¶
If you received a download link:
Download the archive.
Extract it.
Open a console in the root directory an build the image using the command below:
docker build -t awareknomi/document_validation .
This command creates a local Docker image tagged as awareknomi/document_validation
.
Configuration¶
Document Validation accepts environment variables to control its behavior.
Available Environment Variables¶
Variable |
Description |
---|---|
|
(Required) URL of the Regula server. |
|
Enable/disable logging of requests. Values: |
|
Directory to store logs. Default: |
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¶
docker run
: Runs a new container.-p 8095:8080
: Maps host port 8095 to container port 8080.--volume ./logs:/logs
: Mounts host./logs
directory to/logs
inside the container.--detach
: Runs the container in the background.--restart always
: Ensures the container restarts automatically.--name document_validation
: Names the container.--env DOCUMENTVALIDATION_REGULARURL=...
: Passes the Regula server URL.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.