Skip to content

Commit ce87f21

Browse files
💚 copy package.xml only, then rosdep, then copy rest of code
1 parent 8f4eb68 commit ce87f21

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,22 @@ RUN mkdir -p build && cd build && \
4848
make install && \
4949
ldconfig
5050

51-
52-
COPY src/interfaces ./src/interfaces
53-
COPY src/bringup ./src/bringup
54-
COPY src/controller_stonefish ./src/controller_stonefish
55-
COPY src/mission_executor ./src/mission_executor
56-
COPY vendor/stonefish_ros2 ./src/stonefish_ros2
51+
# copy only package manifests
52+
COPY src/*/package.xml ./src/
5753

5854
RUN rosdep init || true && \
5955
rosdep update
6056

6157
RUN bash -c "source /opt/ros/jazzy/setup.bash && \
6258
rosdep install --from-paths src --ignore-src -r -y || true"
6359

60+
# copy rest of source code
61+
COPY src/interfaces ./src/interfaces
62+
COPY src/bringup ./src/bringup
63+
COPY src/controller_stonefish ./src/controller_stonefish
64+
COPY src/mission_executor ./src/mission_executor
65+
COPY vendor/stonefish_ros2 ./src/stonefish_ros2
66+
6467
# Build ROS 2 workspace
6568
WORKDIR /ros2_ws
6669
RUN bash -c "source /opt/ros/jazzy/setup.bash && \

0 commit comments

Comments
 (0)