Installing and configuring the eperi sEcure Platform Docker image
Install and configure a Docker image with the eperi sEcure Platform already deployed.
Procedure
-
Log in to the eperi Docker registry
To fetch an image from the Docker registry, you need to log in first.
Please get your credentials from eperi support beforehand.docker login docker.eperi.com -
Now fetch the latest version via
docker pull docker.eperi.com/<adaptername>:<version>Note: Replace <adaptername> with an adapter offered as a Docker image. Example: "eperi-adapter-m365".CAUTION: The name is case-sensitive!Note: Replace <version> with the version you want to use (e.g., 25.3.1.0) -
Map the configuration
Before starting a Docker image, you should first define locations where you can persist the database.conf file and the Tomcat configuration.
Example:
/etc/eperi/gateway/node1/tomcat/etcto be mapped on/etc/eperi/gateway/tomcat/etc/eperi/gateway/node1/gateway/etcto be mapped on/opt/eperi/gateway/tomcat/webapps/ROOT/etc/var/log/eperi/gateway/node1/to be mapped on/var/log/eperi/etc/eperi/gateway/node1/tomcat/classesto be mapped on/opt/eperi/gateway/tomcat/webapps/ROOT/WEB-INF/classes/Note:When upgrading from a Docker image version < 25.3.1.0 to a version >= 25.3.1.0, please note the following:
If the logs directory
/var/log/eperi/gateway/tomcatis persisted to a volume, you need to change ownership of the mounted volume to ensure the new non-root user inside the Docker container can write to the directory. Otherwise, the application will fail to start.Option 1: Update ownership on the host
On your host machine, change the ownership of the mounted directory so the new container user has access:
sudo chown -R 1001:1001 /host/path/to/mounted/logs/volumeOption 2: Update ownership inside the container
If you have control over how the container is run, you can start it as root, fix ownership, and then restart it as a non-root user.
- Start the container as
root - Inside the container, change ownership of the log directory:
chown -R eperi:eperi /var/log/eperi/gateway/tomcat- Exit the container and restart it normally.
- Start the container as
-
Creating volumes
To map the external folders into the container, you have to create the following volumes:
#volume for Tomcat /etc/eperi/gateway/tomcat sudo mkdir -p /etc/eperi/gateway/node1/tomcat/etc docker volume create --driver local --opt type=none --opt device=/etc/eperi/gateway/node1/tomcat/etc --opt o=bind tomcat_config_node1Docker does not update content of mapped drives when creating a new container. Hence please double-check the eperi sEcure Platform release notes for changes in the Tomcat configuration and adapt these manually if necessary.
#volume for /opt/eperi/gateway/tomcat/webapps/ROOT/etc sudo mkdir -p /etc/eperi/gateway/node1/gateway/etc docker volume create --driver local --opt type=none --opt device=/etc/eperi/gateway/node1/gateway/etc --opt o=bind gateway_config_node1Docker does not update content of mapped drives when creating a new container. Hence, please remove the container, backup the database.conf, delete the volume gateway_config_node1 and the folder /etc/eperi/gateway/node1/gateway/etc.
Then recreate the folder, volume and the new container version. After that, restore the database.conf and restart container.
#volume for /var/log/eperi sudo mkdir -p /var/log/eperi/gateway/node1/ docker volume create --driver local --opt type=none --opt device=/var/log/eperi/gateway/node1/ --opt o=bind logfiles_node1Note: catalina.out will be available under /var/log/eperi/gateway/node1/gateway/tomcat/catalina.out and can be monitored viasudo tail -f /var/log/eperi/gateway/node1/gateway/tomcat/catalina.out -
Run Docker
Now execute
docker runon the adapter image by mapping the previously created folders and name the container platform in detached mode.Note: Replace <version> by the version you want to use (e.g., 25.3.1.0)
Since the database configuration is not created automatically you should now execute the CLI inside the container and create the database.conf file:#Mapping ports with "-p 8443:8443" and "-p 443:443" docker run -p 8443:8443 -p 443:443 -d -v logfiles_node1:/var/log/eperi -v tomcat_config_node1:/etc/eperi/gateway/tomcat -v gateway_config_node1:/opt/eperi/gateway/tomcat/webapps/ROOT/etc --name eperigateway docker.eperi.com/<adaptername>:<version>docker exec -it eperigateway /opt/eperi/gateway/cli/gateway-cliNote: When selecting the Master Key method, the environment variableEnter the credentials to create the database configuration as described here Performing the initial configuration, then restart the docker container by typing:EPERIMASTERKEYneeds to be set if RAM password is chosen.docker stop eperigateway docker start eperigateway
