Extending/sourcing the ROS install dir in a Dockerfile's build phase
I'm putting together a Dockerfile that builds some custom ROS packages on top of a ROS Indigo installation in /opt/ros/indigo
. How do I source this installation directory such that catkin_tools
will know that my custom workspace is extending the ROS Indigo installation?
Here's my hacky attempt, which seems to be working:
RUN /bin/bash -c "source /opt/ros/indigo/setup.bash ;\
catkin init ;\
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release ;\
catkin build --no-status --no-summary --no-notify"
This results in the following output from catkin init
:
Extending: [env] /opt/ros/indigo
Is there a more elegant way of accomplishing this?
PS. I'm aware of ENTRYPOINT
, but that's for when the container is run, not during docker build
Your problem is that
RUN source ...
is not persistent? Here I see some suggestions for it.Thanks for the link. Looking at the answers, I'm basically doing this one: http://stackoverflow.com/a/25998432/2... The others seem to have various problems (according to the comments) but I'll take a look. I'll report back if any of them work nicely. Thanks again.
When we added build dockerfiles for MoveIt! we went the other route from stackoverflow link above. :/
See links
https://github.com/davetcoleman/movei...
https://github.com/ros-planning/movei...