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 entrypoint listed in a Dockerfile is skipped unless the command is passed as an array of strings instead of one string (with spaces and whatnot). This is a bit of a weird behavior with docker that isn't obvious, but, you have to give it your command in such a way that it knows it can run it after the entrypoint and not in a subshell. See the CMD documentation here: . The same applies to the command: data in a docker-compoose file, and it looks like docker-py supports passing a python list instead of a string as well:

So, if you changed your code to:

>>> logs = container.exec_run(cmd=['rosparam', 'list'])
>>> print(logs)

I think you'd have your entrypoint executed.