README
title: Installing Docker Containers sidebar_label: Installing Docker Containers
Installing Docker Containers
What is Docker
Docker is a software platform that enables applications and their dependencies to run in isolated containers. Docker offers a number of advantages for software development, deployment, and scaling:
- Portability: Docker containers can run on any machine where Docker is installed, regardless of the operating system or hardware.
- Consistency: Docker containers ensure that applications always run under the same conditions, whether they are executed locally, in the cloud, or on another server.
- Efficiency: Docker containers make optimal use of the host machine’s resources by providing only what is necessary for the application. This reduces storage space and energy consumption.
- Security: Docker containers isolate applications from one another and from the host system, minimizing the risk of conflicts or attacks.
With Docker, the OPC Router can be operated in any environment where Docker can be installed.
Docker Installation
To install Docker, follow the instructions in the official Docker documentation for your platform.
To confirm that the installation was successful, run the command docker --version in the command prompt. If you receive a message such as Docker version 20.10.22, build 3a2c30b, Docker is ready to use.
In container environments (e.g., Docker, Kubernetes), licensing with online synchronization is required if it is operated without the TPM2 module.
By default, the integrated MongoDB can only be accessed within the container itself. If you need to access MongoDB from outside the container, the environment variable MONGO_BIND must be set to all.
For more information on environment variables for the integrated MongoDB, see the Configurable Environment Variables page.
Quick OPC Router Test Installation with Docker
The OPC Router 5 Docker container can be quickly installed for testing purposes within seconds by executing a single command:
docker run -d -e OR_DISABLE_AUTH=true -e OR_I_ACCEPT_EULA=true --name opcrouter5 -p 8080:8080 opcrouter/runtime:latest
By executing this command and setting the environment variable OR_I_ACCEPT_EULA to true, you agree to the End User License Agreement.
This command does not create persistent volumes. Therefore, deleting the container via Docker Desktop will result in the irreversible loss of all data on the container, such as configured projects. This command is therefore not suitable for production use.
Executing the command creates a new container named opcrouter5. Port 8080 is exposed to the outside, so the web management interface should be accessible locally at http://127.0.0.1:8080.
The command docker container rm -f opcrouter5 stops and deletes the container. The container’s automatically created temporary volumes, which contain the project and configuration data, are not automatically deleted by this command.
The OPC Router Docker Images
The OPC Router has two different images:
- The runtime image (opcrouter/runtime) contains the OPC Router application, the web management interface, and an integrated MongoDB in which OPC Router data, such as projects, is stored.
- Like the runtime image, the service image (opcrouter/service) contains the application and web management, but does not include an integrated MongoDB. A MongoDB must be connected separately here for the application to run.
Recommended Runtime Deployment
Instead of the test installation, this section describes a Docker Run command suitable for production use. This command cannot simply be copied and run; it must be customized first.
docker run -d --pull always \
--name opcrouter5 \
-e OR_I_ACCEPT_EULA=false \
-e INITIAL_USERNAME=***** \
-e INITIAL_PASSWORD=***** \
-e TZ=Europe/Berlin \
-v opc-router-5-data:/data \
-v opc-router5-logs:/var/log/opcrouter \
-p 8080:8080 \
-p 8001:8001 \
-p 49420:49420 \
opcrouter/runtime:latest
For this command to work, you must accept the End User License Agreement by setting the environment variable OR_I_ACCEPT_EULA to true and specifying a valid username and password for the initial user in the environment variables INITIAL_USERNAME and INITIAL_PASSWORD.
Here are some arguments used:
-d: The container is started as a background process--pull always: Ensures that the latest version of the image is downloaded when the command is executed, provided it differs from a version already present locally--name: Sets a unique name for the container-e: Sets an environment variable-v: Sets a persistent volume-p: Exposes an internal port on the host
Regarding the environment variables, note that we set an initial user with username (INITIAL_USERNAME) and password (INITIAL_PASSWORD) that we can use to log in to Web Management. The time zone is also set. A more detailed explanation and list of all configurable environment variables can be found here:
Configurable Environment Variables
Persistent volumes are created for the two available mount paths so that data on the container—such as the project structure, project backups, log files, etc.—is preserved when we delete the container and create a new one with the same volumes. A more detailed explanation of the available mount paths can be found here: