0
$\begingroup$

Rosanswers logo

I'm setting up a docker container for a project of mine which runs using ROS. I'm using rosmake and need to set the ROS_PACKAGE_PATH environment variable to include my own packages before calling rosmake. In the Dockerfile, I use ENV ROS_PACKAGE_PATH /foo:$ROS_PACKAGE_PATH

However when I run the container, the ROS_PACKAGE_PATH only contains /opt/ros/indigo/share:/opt/ros/indigo/stacks I need some help with this because without setting the ROS_PACKAGE_PATH I can't invoke a rosmake from inside the Dockerfile. Since the exact same method of setting environment variables is being used, successfully to set other non-ROS-related variables, I feel it might be more of a ROS issue than a Docker issue.

Thanks!


Originally posted by AkshatAgarwal on ROS Answers with karma: 31 on 2016-06-15

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The problem was that the Dockerfile set the ROS_PACKAGE_PATH env variable for build time but it got reset during run time. I solved this by putting a script that set ROS_PACKAGE_PATH inside the container and calling it in the dockerfile using a RUN command before running rosmake through the Dockerfile itself. That worked beautifully.


Originally posted by AkshatAgarwal with karma: 31 on 2016-06-17

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.