[docker] how to run an action server in a container

asked 2017-02-06 16:30:17 -0500

waspinator gravatar image

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-doc...

edit retag flag offensive close merge delete

Comments

You're not exposing any ports, is that intentional?

gvdhoorn gravatar image gvdhoorn  ( 2017-02-07 04:11:34 -0500 )edit

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, and rostopic echo /chatter from the host in my other two examples (also on github).

waspinator gravatar image waspinator  ( 2017-02-07 07:39:34 -0500 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2017-02-07 08:17:10 -0500 )edit

Perhaps there is a problem with name resolution. I see you have an instance of resolvable there, but have you tried with setting ROS_IP for all containers / hosts? If not all involved parties can resolve the DNS names to their IP, things like you describe can happen.

gvdhoorn gravatar image gvdhoorn  ( 2017-02-07 08:18:33 -0500 )edit

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.

waspinator gravatar image waspinator  ( 2017-02-07 08:41:40 -0500 )edit

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-doc...

waspinator gravatar image waspinator  ( 2017-02-07 08:53:50 -0500 )edit