Use ROS and "network_mode: host" in Docker-Compose

Hey There!

I’m new to Docker. I have a ROS setup with a ROS Master and a ROS Node which needs to access the Ethernet Device. Both are in a separate Container. When I link them in Docker-Compose with
“links: ros-master” the node can find the roscore in the other Container. But I need that Container to use the Host network to communicate with the EtherCAT slave. When I use a test App which contains no ROS and do “network_mode: host” it can communicate with the slave, but when I try to set it up with ROS it can’t find the slave nor the roscore.

Thanks for your help!

Hi Nicolas, i’m starting with ros and containers. can you connect ros container to the ethercat device? if so, can you explain how. Thanks in advance