Skip to content

Instantly share code, notes, and snippets.

@j-rivero
Created April 2, 2024 18:19
Show Gist options
  • Save j-rivero/430c2dc6c73860dd72116ad362413ac3 to your computer and use it in GitHub Desktop.
Save j-rivero/430c2dc6c73860dd72116ad362413ac3 to your computer and use it in GitHub Desktop.
FROM ubuntu:jammy as gazebo11_ubuntu_installed
# 1. Install gazebo from official jammy packages: 11.10.2
RUN apt-get update \
&& apt-get install -y libgazebo-dev software-properties-common wget gazebo
FROM gazebo11_ubuntu_installed as gazebo11_ppa_installed
# 2. Install the new PPA for transitioning
RUN add-apt-repository ppa:j-rivero/gazebo11-gz-cli -y
RUN wget http://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-dejavu/ttf-dejavu-core_2.37-1_all.deb \
&& dpkg -i ttf-dejavu-core*.deb
# 3. Update gazebo to the new PPA version: 11.14.0
RUN apt-get update && apt-get install -y libgazebo11-dev gazebo11
# Check the new gazebo packages installed and the gz belonging to them
RUN dpkg -l | grep gazebo
RUN dpkg -L gazebo11-gz-cli
RUN gz --help 2>&1 | grep 'Output information'
FROM gazebo11_ppa_installed
RUN sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
RUN sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-prerelease `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-pre.list'
RUN wget https://packages.osrfoundation.org/gazebo.key -O - | apt-key add -
RUN apt-get update
# Install gz-harmonic on top of the existing gazebo11
# it will only remove gazebo11-gz-cli
RUN apt-get install -y libgz-tools2-dev=2.0.1-2~jammy gz-harmonic
# Check binaries installed and packages where they belong to
RUN dpkg -S /usr/bin/gz
RUN dpkg -S /usr/bin/gz11
RUN dpkg -S /usr/bin/gzserver
RUN dpkg -S /usr/bin/gzclient
RUN dpkg -S /usr/bin/gazebo
# Simulate how the gazebo11-gz-cli package would uninstall gz-tools2 and most of the Harmonic family
# to get gz back to be the one in gazebo11
RUN apt-get install -s gazebo11-gz-cli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment