Skip to content

PROFINET Docker

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

The following examples use the iotechsys/xrt:2.0 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 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 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.0/deployment \
  -v /sys/:/sys/ \
  --entrypoint nsenter \
  iotechsys/xrt:2.0.0-x86 \
  --net=/rootns/net /opt/iotech/xrt/2.0/bin/xrt /opt/iotech/xrt/2.0/deployment [time_in_seconds]

Note

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

Back to top