From 470a8b577563ab7d28ccc322800d8591086b4a1b Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Thu, 16 May 2024 06:09:55 +0900 Subject: [PATCH] chore(docker): separate `rosdep install` and `colcon build` RUN commands (#4719) --- docker/autoware-openadk/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/autoware-openadk/Dockerfile b/docker/autoware-openadk/Dockerfile index c7ce5cca809..3602fe690cf 100644 --- a/docker/autoware-openadk/Dockerfile +++ b/docker/autoware-openadk/Dockerfile @@ -66,7 +66,10 @@ RUN --mount=type=ssh \ && apt-get update \ && rosdep update \ && DEBIAN_FRONTEND=noninteractive rosdep install -y --ignore-src --from-paths src --rosdistro "$ROS_DISTRO" \ - && source /opt/ros/"$ROS_DISTRO"/setup.bash \ + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache + +# Build Autoware +RUN source /opt/ros/"$ROS_DISTRO"/setup.bash \ && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --cmake-args \ " -Wno-dev" \ " --no-warn-unused-cli" \ @@ -74,7 +77,6 @@ RUN --mount=type=ssh \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ && find /autoware/install -type d -exec chmod 777 {} \; \ && chmod -R 777 /var/tmp/ccache \ - && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache \ && rm -rf /autoware/build /autoware/src CMD ["/bin/bash"]