diff --git a/docker/Dockerfile b/docker/Dockerfile index fc160cad57c..c1d0a0d79ad 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -10,10 +10,15 @@ USER root # Install RUN apt update \ && apt upgrade -y \ - && apt install -y cmake curl git python3 python3-distutils python3-pip liboctomap-dev \ - && python3 -m pip install vcstool -q \ - && python3 -m pip install colcon-common-extensions -q \ - && python3 -m pip install rosdep -q \ + && apt install -y cmake curl git python3 liboctomap-dev + +# Add ROS2 sources to install ROS infrastructure tools +RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null + +# Install and configure ROS infrastructure tools +RUN apt update \ + && apt install -y python3-vcstool python3-colcon-common-extensions python3-rosdep \ && rosdep init \ && rosdep update