forked from ros-navigation/navigation2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
release_branch.Dockerfile
41 lines (36 loc) · 1.11 KB
/
release_branch.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# This dockerfile expects proxies to be set via --build-arg if needed
# It also expects to be contained in the /navigation2 root folder for file copy
#
# Example build command:
# export CMAKE_BUILD_TYPE=Debug
# docker build -t nav2:release_branch \
# --build-arg FROM_IMAGE=dashing \
# --build-arg CMAKE_BUILD_TYPE \
# -f Dockerfile.release_branch ./
ARG FROM_IMAGE=dashing
FROM ros:$FROM_IMAGE
# copy ros package repo
ENV NAV2_WS /opt/nav2_ws
RUN mkdir -p $NAV2_WS/src
WORKDIR $NAV2_WS/src
COPY ./ navigation2/
# install navigation2 package dependencies
WORKDIR $NAV2_WS
RUN . /opt/ros/$ROS_DISTRO/setup.sh && \
apt-get update && \
rosdep install -q -y \
--from-paths \
src \
--ignore-src \
&& rm -rf /var/lib/apt/lists/*
# build navigation2 package source
ARG CMAKE_BUILD_TYPE=Release
RUN . /opt/ros/$ROS_DISTRO/setup.sh && \
colcon build \
--symlink-install \
--cmake-args \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
# source navigation2 workspace from entrypoint
RUN sed --in-place --expression \
'$isource "$NAV2_WS/install/setup.bash"' \
/ros_entrypoint.sh