@@ -105,32 +105,33 @@ ENV DEBIAN_FRONTEND=noninteractive
105105ENV GZ_VERSION=harmonic
106106
107107# Install Gazebo Harmonic: https://gazebosim.org/docs/harmonic/install_ubuntu
108- RUN sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg \
109- && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null \
110- && sudo apt-get -q update \
111- && sudo apt-get -y --quiet --no-install-recommends install \
108+ USER root
109+ # Install custom rosdep list
110+ ADD --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
111+ RUN wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg \
112+ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null \
113+ && apt-get -q update \
114+ && apt-get -y --quiet --no-install-recommends install \
112115 gz-${GZ_VERSION} \
113- && sudo apt-get autoremove -y \
114- && sudo apt-get clean -y \
115- && sudo rm -rf /var/lib/apt/lists/*
116+ && apt-get autoremove -y \
117+ && apt-get clean -y \
118+ && rm -rf /var/lib/apt/lists/*
116119
117120# Install ArduPilot and ardupilot_gazebo dependencies
118- RUN sudo apt-get -q update \
119- && sudo apt-get -q -y upgrade \
120- && sudo apt-get -q install --no-install-recommends -y \
121+ RUN apt-get -q update \
122+ && apt-get -q -y upgrade \
123+ && apt-get -q install --no-install-recommends -y \
121124 python3-pexpect \
122125 python3-wxgtk4.0 \
123126 python3-future \
124127 rapidjson-dev \
125128 xterm \
126- libgz-sim?-dev \
127- gz-transport?? \
128- libgz-transport??-dev \
129129 rapidjson-dev \
130130 libopencv-dev \
131- && sudo apt-get autoremove -y \
132- && sudo apt-get clean -y \
133- && sudo rm -rf /var/lib/apt/lists/*
131+ && apt-get autoremove -y \
132+ && apt-get clean -y \
133+ && rm -rf /var/lib/apt/lists/*
134+ USER $USERNAME
134135
135136# Clone ArduSub
136137# ArduSub is installed for simulation purposes ONLY
@@ -166,13 +167,11 @@ RUN [ "/bin/bash" , "-c" , " \
166167
167168# Install ros_gz and other project dependencies
168169WORKDIR $USER_WORKSPACE
169- # Some gz_* rosdep keys must be skipped because they are not in the rosdep yaml humble/iron
170- # (despite the fact the packages are available). Ensure they are installed manually.
171170RUN sudo apt-get -q update \
172171 && sudo apt-get -q -y upgrade \
173172 && vcs import src < src/blue/blue.repos \
174173 && rosdep update \
175- && rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --skip-keys= "gz-transport13 gz-sim8 gz-math7 gz-msgs10" \
174+ && rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} \
176175 && sudo apt-get autoremove -y \
177176 && sudo apt-get clean -y \
178177 && sudo rm -rf /var/lib/apt/lists/*
0 commit comments