Skip to content

OPC-UA

You can run the XRT OPC-UA Device Service in a docker container.

The following examples use the iotechsys/xrt:1.1.49 docker image.

You can run on either of the following networks when running the XRT docker container:

  • Host
  • Docker bridge

Run on Host Network

To run on the host network, the docker image must run on the host machine's subnet. This allows the XRT OPC-UA Device Service component to see any locally-connected OPC-UA servers that are on the same subnet as the host machine.

In the following example command the network flag is set to host, xrt-opcua provides the name of the running container, <config_directory> provides the location of the config folder, and [time_in_seconds] can optionally define the time for which XRT is to run in seconds:

docker run --rm --name <xrt-opcua> -v <config_directory>:/opt/iotech/xrt/config \
    --networkhost -it iotechsys/xrt:1.1.49 [time_in_seconds]

Run on Docker Bridge Network

In the following example command the network flag is set to <docker_bridge_network>, which provides the docker bridge network to which to connect, xrt-opcua provides the name of the running container, <config_directory> provides the location of the config folder, and [time_in_seconds] can optionally define the time for which XRT is to run in seconds:

docker run --rm --name <xrt-opcua> -v <config_directory>/config:/opt/iotech/xrt/config \
    --network <docker_bridge_network> -it iotechsys/xrt:1.1.49 [timeout in secs]

Note

If the network flag is not included in the command, the default bridge network is used.

Back to top