Skip to content

PROFINET Docker

You can run the Edge Xrt PROFINET Device Service in a docker container.

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

To run the containerized Xrt PROFINET Device Service, the container must be able to access the network device on the host that is set as the Driver option NetworkInterface in the device service configuration file. This can be done using nsenter and mounting the host's network namespace within the container.

Run Edge Xrt with PROFINET

In the following example, xrt-profinet provides the name of the running container, provides the location of the config, state and profiles folders. [time_in_seconds] can optionally define the time for which Edge Xrt is to run in seconds:

docker run --rm --name xrt-profinet \
  --privileged --cap-add=sys_nice \
  --mount type=bind,source=/proc/1/ns,target=/rootns/ \
  -v <deployment_directory>/deployment:/opt/iotech/xrt/2.1/deployment \
  -v /sys/:/sys/ \
  --entrypoint nsenter \
  iotechsys/xrt:2.1.0-x86 \
  --net=/rootns/net /opt/iotech/xrt/2.1/bin/xrt /opt/iotech/xrt/2.1/deployment [time_in_seconds]

Note

The PROFINET device service can currently only run under x86 platforms, therefore, the iotechsys/xrt:2.1.0-x86 image from dockerhub must be used.