[docker] how to run an action server in a container
I'm trying to run an action server in a container, and connect an action client running on the host, but they don't seem to be able to communicate. I made a repository with the example on github.
https://github.com/waspinator/ros-docker-examples/tree/master/actionlib-fibonacci
Asked by waspinator on 2017-02-06 17:30:17 UTC
Comments
You're not exposing any ports, is that intentional?
Asked by gvdhoorn on 2017-02-07 05:11:34 UTC
not especially. I wasn't sure which to expose. I think the wiki says all ports need to be open on all hosts, so is it 0-65535? Even without exposing any ports, I can still
rosnode list
,rostopic list
, androstopic echo /chatter
from the host in my other two examples (also on github).Asked by waspinator on 2017-02-07 08:39:34 UTC
O, wait. This is all on the same host, and you don't want hosts on the network to connect to your Docker node graph? Then exposing ports should not be necessary no.
Asked by gvdhoorn on 2017-02-07 09:17:10 UTC
Perhaps there is a problem with name resolution. I see you have an instance of
resolvable
there, but have you tried with settingROS_IP
for all containers / hosts? If not all involved parties can resolve the DNS names to their IP, things like you describe can happen.Asked by gvdhoorn on 2017-02-07 09:18:33 UTC
Right now, all containers are running on the same host. The issue I'm having though is communication between the host and the containers. I imagine once that works, it wouldn't be a problem to have other devices communicate with the containers either. I'm still not clear on which ports to expose.
Asked by waspinator on 2017-02-07 09:41:40 UTC
I changed the docker-compose file to include IP address information. Still not working though. Is this how I was supposed to do it? https://github.com/waspinator/ros-docker-examples/blob/master/actionlib-fibonacci/docker-compose-with-ip.yaml
Asked by waspinator on 2017-02-07 09:53:50 UTC