I’ve created a docker image that runs a ROS1 rospy project. This project is run on a mobile robot that connects to the onboard computer running the image container. In order to communicate properly, the container needs to open a socket listener that binds to an ip. The ip in question is the gateway ip of the tag (the onboard computer). The issue is that for whatever reason the socket creation fails when running inside the container, but not when running natively.
I’ve tried running both with docker compose and with docker run and in both case it wont work.
The container and the exterior are able to communicate since it is able to connect to the tag ethernet ip and communicate to the robot base, but it simply wont open a socket listener.
The specific error is Erno99 - cannot assign requested address.
I can show dockerfile, compose file and docker run command if needed. Thanks in advance.
Are you really using Docker Desktop? What IP are you trying to bind to? IP addresses on your host will not work inside the container unless you run the container on host network, which will not work with Docker Desktop as you have a virtual machine too and the host network is the network of the VM.
No i dont use docker desktop, I might have created the issue in the wrong place. And I run my container with network=host so yes they should be able to communicate. The issue has more to do with the socket creation, since I already know the host is able to communicate with the container. thx