-
Notifications
You must be signed in to change notification settings - Fork 18
/
Dockerfile.melodic
58 lines (49 loc) · 1.79 KB
/
Dockerfile.melodic
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM osrf/ros:melodic-desktop
SHELL ["bash", "-c"]
ENV WORKSPACE /catkin_ws
ARG RUN_TESTS=false
ARG AERO_TYPE=typeF
# prepare catkin and all euslisp packages
RUN apt-get -q -qq update && apt-get -q -qq install -y \
ros-${ROS_DISTRO}-catkin \
python-wstools python-catkin-tools \
bc net-tools iputils-ping
# create catkin workspace
RUN mkdir -p ${WORKSPACE}/src/aero-ros-pkg
WORKDIR ${WORKSPACE}
RUN wstool init ${WORKSPACE}/src
COPY . ${WORKSPACE}/src/aero-ros-pkg/
# catkin build
WORKDIR ${WORKSPACE}
RUN source /opt/ros/${ROS_DISTRO}/setup.bash \
&& rosdep install -q -y -r --from-paths src --ignore-src \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/
RUN source /opt/ros/${ROS_DISTRO}/setup.bash \
&& catkin config --init
RUN source /opt/ros/${ROS_DISTRO}/setup.bash \
&& catkin build aero_description
WORKDIR ${WORKSPACE}/src/aero-ros-pkg/aero_description
RUN source ${WORKSPACE}/devel/setup.bash \
&& ./setup.sh $AERO_TYPE
WORKDIR ${WORKSPACE}
## build check
RUN source ${WORKSPACE}/devel/setup.bash \
&& catkin build aero_std
RUN source ${WORKSPACE}/devel/setup.bash \
&& catkin build aero_samples
RUN source ${WORKSPACE}/devel/setup.bash \
&& catkin build aero_gazebo
## test
RUN if [ "$RUN_TESTS" = "true" ]; then \
source ${WORKSPACE}/devel/setup.bash \
&& catkin run_tests --no-deps aero_ros_controller \
&& catkin_test_results ${WORKSPACE}/build/aero_ros_controller; fi
RUN if [ "$RUN_TESTS" = "true" ]; then \
source ${WORKSPACE}/devel/setup.bash \
&& catkin run_tests --no-deps aero_std \
&& catkin_test_results ${WORKSPACE}/build/aero_std; fi
RUN if [ "$RUN_TESTS" = "true" ]; then \
source ${WORKSPACE}/devel/setup.bash \
&& catkin run_tests --no-deps aero_samples \
&& catkin_test_results ${WORKSPACE}/build/aero_samples; fi