1- ARG ROS_DISTRO=rolling
1+ ARG ROS_DISTRO=iron
22FROM ros:$ROS_DISTRO-ros-base AS ci
33
44ENV DEBIAN_FRONTEND=noninteractive
@@ -120,6 +120,8 @@ ENV DEBIAN_FRONTEND=noninteractive
120120ENV GZ_VERSION=harmonic
121121
122122# Install Gazebo Harmonic: https://gazebosim.org/docs/harmonic/install_ubuntu
123+ # Per DL3004, use "USER root" rather than "sudo"
124+ # https://github.com/hadolint/hadolint/wiki/DL3004
123125USER root
124126# Install custom rosdep list
125127ADD --chown=root:root --chmod=0644 https://raw.githubusercontent.com/osrf/osrf-rosdep/master/gz/00-gazebo.list /etc/ros/rosdep/sources.list.d/00-gazebo.list
@@ -128,19 +130,11 @@ RUN wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pk
128130 && apt-get -q update \
129131 && apt-get -y --quiet --no-install-recommends install \
130132 gz-${GZ_VERSION} \
131- ros-${ROS_DISTRO}-ros-gz${GZ_VERSION} \
132- && apt-get autoremove -y \
133- && apt-get clean -y \
134- && rm -rf /var/lib/apt/lists/*
135-
136- # Install ArduPilot and ardupilot_gazebo dependencies
137- RUN apt-get -q update \
138- && apt-get -q -y upgrade \
139- && apt-get -q install --no-install-recommends -y \
140133 python3-pexpect \
141134 python3-wxgtk4.0 \
142135 python3-future \
143136 rapidjson-dev \
137+ ros-${ROS_DISTRO}-ros-gz${GZ_VERSION} \
144138 xterm \
145139 rapidjson-dev \
146140 libopencv-dev \
@@ -186,7 +180,7 @@ WORKDIR $USER_WORKSPACE
186180RUN sudo apt-get -q update \
187181 && sudo apt-get -q -y upgrade \
188182 && rosdep update \
189- && rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} \
183+ && rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --skip-keys= "gz-transport12 gz-sim7 gz-math7 gz-msgs9 gz-plugin2" \
190184 && sudo apt-get autoremove -y \
191185 && sudo apt-get clean -y \
192186 && sudo rm -rf /var/lib/apt/lists/*
0 commit comments