Docker
The application is published as a docker image. Here is an example docker compose file to start the master:
services:
ethercat-master:
image: voraus.jfrog.io/docker/voraus-ethercat-master:latest
network_mode: host
pid: host
cap_add:
- CAP_NET_ADMIN # needed for setting the interface into promiscuous mode
- CAP_NET_RAW # needed for raw socket communication
- CAP_IPC_LOCK # needed for memory locking
- CAP_SYS_NICE # needed for using SCHED_FIFO with a priority
devices:
- /dev/cpu_dma_latency:/dev/cpu_dma_latency # needed for sleep state prevention
# - /dev/net/tun:/dev/net/tun # uncomment if you want to use a TAP device for EoE
volumes:
- ./data/:/root/data/ # contains eni file and logs
environment:
- ECAT_ENI=/root/data/test_eni.xml
- ECAT_CYCLETIME=2000
- ECAT_INTERFACE=eth0
- ECAT_LOG_DIR=/root/data/log
The network_mode: host is required because the EtherCAT master uses raw sockets.
The pid: host is unfortunately required for codemeter to work properly together with network_mode: host.
It might actually start, if this is omitted, but codemeter might kill the process after a while.
See Configuration for details about configuration. This page also contains further explanation for the used capabilities.