Skip to content

Commit da700c0

Browse files
Added colcon build args for local builds (#5)
* Fixed colcon build args Signed-off-by: Cihat Kurtuluş Altıparmak <[email protected]> * Added customized build option Signed-off-by: CihatAltiparmak <[email protected]> * Update README.md Signed-off-by: Steve Macenski <[email protected]> --------- Signed-off-by: Cihat Kurtuluş Altıparmak <[email protected]> Signed-off-by: CihatAltiparmak <[email protected]> Signed-off-by: Steve Macenski <[email protected]> Co-authored-by: Steve Macenski <[email protected]>
1 parent 6f1d318 commit da700c0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ RUN apt install cppzmq-dev ros-${ROS_DISTRO}-ros-gz -y --no-install-recommends -
2929

3030
# For distribution of Nav2
3131
ARG BUILD=true
32+
ARG COLCON_BUILD_ARGS=""
3233
RUN if [ "${BUILD}" = "true" ]; then \
33-
. /opt/ros/${ROS_DISTRO}/setup.sh && colcon build; \
34+
. /opt/ros/${ROS_DISTRO}/setup.sh && colcon build $COLCON_BUILD_ARGS; \
3435
fi
3536

3637
WORKDIR /root/nav2_ws

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ If you do NOT want to build Nav2 for distribution with the container (setup for
4949

5050
Occasionally, may need to update the base and rebuild when it diverges significantly.
5151

52+
Additionally, if you want to build with customized arguments, you can add your build arguments as in the example `--build-arg COLCON_BUILD_ARGS="--symlink-install"`.
53+
5254
```
5355
sudo docker pull osrf/ros:${ROS_DISTRO}-desktop-full
5456
sudo docker build -t ros-navigation/nav2_docker:local -f Dockerfile .

0 commit comments

Comments
 (0)