ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The probably most easy solution is to put the the call of /ros_entrypoint.sh in front of the actual command. (This works because ros_entrypoint.sh calls the argument passed...)

>>> import docker
>>> docker_client = docker.DockerClient(base_url='unix://var/run/docker.sock')
>>> container = docker_client.containers.run(image="osrf/ros:indigo-desktop-trusty", detach=True, tty=True)
>>> logs = container.exec_run(cmd='/ros_entrypoint.sh rosparam list')
>>> print(logs)
ExecResult(exit_code=1, output='ERROR: Unable to communicate with master!\n')