-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (31 loc) · 1.1 KB
/
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
ARG ROS_DISTRO=noetic
FROM ros:$ROS_DISTRO-ros-base AS pkg-builder
SHELL ["/bin/bash", "-c"]
WORKDIR /ros_ws
RUN apt-get update && apt-get install -y git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/wust-dcr/jaguar_4x4_ros --recursive src/ && \
source /opt/ros/$ROS_DISTRO/setup.bash && \
rm -rf /etc/ros/rosdep/sources.list.d/20-default.list && \
apt-get update && \
rosdep init && \
rosdep update --rosdistro $ROS_DISTRO && \
rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y && \
catkin_make || true && \
source devel/setup.bash && \
catkin_make
FROM ros:$ROS_DISTRO-ros-base
ARG ROS_DISTRO
SHELL ["/bin/bash", "-c"]
WORKDIR /ros_ws
COPY --from=pkg-builder /ros_ws /ros_ws
RUN apt-get update && apt-get install -y python3-rosdep && \
rm -rf /etc/ros/rosdep/sources.list.d/20-default.list && \
rosdep init && \
rosdep update --rosdistro $ROS_DISTRO && \
rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y
RUN apt-get clean && \
apt-get remove -y \
python3-rosdep && \
rm -rf /var/lib/apt/lists/*