
I am having difficultly understanding the difference between a normal colcon build and colcon build --symlink-install.
Originally posted by Shiva_uchiha on ROS Answers with karma: 117 on 2021-02-15
Post score: 9
Original comments
Comment by ThomasL624 on 2022-10-20:
Hi base on this question, I would like to ask could I remove the src log build directories after colcon build --symlink-install?
The reason for doing that is I want to mount a volume (which is the ROS2 workspace) from Host into a docker container.
So, I have to:
COPYthe workspace (include packages),WORKDIRto that path in Dockerfile andmkdir src- Run
rosdep update && rosdep install --from-paths . --ignore-src --rosdistro $ROS_DISTRO - Run
RUN source /opt/ros/"$ROS_DISTRO"/setup.bash && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
This will generate the install build log src directories inside the container, which will not be used, as the host volume will mount and replace it.
Should I delete it? or will it breaks the packages? If so, what is the best approach to mount a workspace from Host which already built in Dockerfile?