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
- ./pki/:/root/pki/ # OPC UA certificates and trust lists
environment:
- ECAT_ENI=/root/data/test_eni.xml
- ECAT_CYCLETIME=2000
- ECAT_INTERFACE=eth0
- ECAT_LOG_DIR=/root/data/log
# enables OPC UA encryption with a self-signed certificate, omit for an unencrypted OPC UA server
- ECAT_OPCUA_PKI=/root/pki
- ECAT_OPCUA_CREATE_SELF_SIGNED_CERT=true
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.
The PKI directory of the OPC UA server must be persistent, so that the server certificate and the trusted client certificates survive the recreation of the container. Otherwise, a new certificate is created and all clients have to trust it again. See OPC UA Server Security for details.
See Configuration for details about configuration. This page also contains further explanation for the used capabilities.