You can run the XRT EtherNet/IP Device Service in a docker container.
The following examples use the
iotechsys/xrt:2.0 docker image.
You can run the XRT docker container on either of the following networks:
- Docker bridge
Run on Host Network
In the following example
xrt-ethernetip provides the name of the running container,
docker run --rm --network=host --name xrt-ethernetip -v <deployment_directory>/deployment:/opt/iotech/xrt/deployment iotechsys/xrt:2.0 [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-ethernetip 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-ethernetip -v <deployment_directory>/deployment:/opt/iotech/xrt/deployment \ --network <docker_bridge_network> iotechsys/xrt:2.0 [timeout in secs]
If the network flag is not included in the command, the default bridge network is used.