File tree Expand file tree Collapse file tree 1 file changed +25
-16
lines changed Expand file tree Collapse file tree 1 file changed +25
-16
lines changed Original file line number Diff line number Diff line change 11ARG ROS_DISTRO=rolling
22FROM ros:${ROS_DISTRO}-ros-core
33
4- RUN apt-get update \
5- && apt-get install -y \
6- ros-dev-tools \
7- wget
8-
94WORKDIR /root/ros2_ws/
10- RUN mkdir -p src
5+
6+ # Install essential dependencies
7+ RUN apt-get update && \
8+ apt-get install -y \
9+ ros-dev-tools \
10+ wget && \
11+ apt-get clean && \
12+ rm -rf /var/lib/apt/lists/*
13+
14+ # Clone dependencies
1115COPY tools/ros2_dependencies.repos .
12- RUN vcs import --input ros2_dependencies.repos src
16+ RUN mkdir -p src && \
17+ vcs import --input ros2_dependencies.repos src
18+
19+ # Initialize rosdep
1320RUN rosdep init
1421
22+ # Copy source code
1523COPY . src/grid_map
16- RUN ls src/grid_map
1724
25+ # Install dependencies
1826SHELL ["/bin/bash" , "-c" ]
19- RUN apt-get update \
20- && rosdep update
21-
22- RUN source /opt/ros/${ROS_DISTRO}/setup.bash \
23- && rosdep install -y --ignore-src --from-paths src --skip-keys slam_toolbox
24-
25- RUN source /opt/ros/${ROS_DISTRO}/setup.bash \
26- && colcon build --symlink-install --packages-up-to grid_map
27+ RUN apt-get update && \
28+ rosdep update && \
29+ source /opt/ros/${ROS_DISTRO}/setup.bash && \
30+ rosdep install -y --ignore-src --from-paths src --skip-keys slam_toolbox && \
31+ apt-get clean && \
32+ rm -rf /var/lib/apt/lists/*
2733
34+ # Build
35+ RUN source /opt/ros/${ROS_DISTRO}/setup.bash && \
36+ colcon build --symlink-install --packages-up-to grid_map
You can’t perform that action at this time.
0 commit comments