Skip to content

Commit

Permalink
Dockerfile and supporting scripts for building ign-gazebo
Browse files Browse the repository at this point in the history
The scripts are split out so that they could potentially be used by other
build pipelines (such as bitbucket or jenkins) and have the changes reflected
everywhere they are used.
  • Loading branch information
mjcarroll committed Jan 28, 2019
1 parent 5041705 commit 48357d8
Show file tree
Hide file tree
Showing 8 changed files with 184 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
build_*
45 changes: 45 additions & 0 deletions docker/Dockerfile.nightly
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FROM ubuntu:bionic

RUN apt-get update \
&& apt-get install -y \
sudo \
&& apt-get clean

COPY docker/scripts/install_common_deps.sh scripts/install_common_deps.sh
RUN scripts/install_common_deps.sh

# This is not strictly necessary, but makes things faster down the line.
COPY docker/scripts/install_ign_deps.sh scripts/install_ign_deps.sh
RUN scripts/install_ign_deps.sh

COPY docker/scripts/enable_gcc8.sh scripts/enable_gcc8.sh
RUN scripts/enable_gcc8.sh

COPY docker/scripts/enable_ign_stable.sh scripts/enable_ign_stable.sh
RUN scripts/enable_ign_stable.sh

COPY docker/scripts/enable_ign_prerelease.sh scripts/enable_ign_prerelease.sh
RUN scripts/enable_ign_prerelease.sh

COPY docker/scripts/enable_ign_nightly.sh scripts/enable_ign_nightly.sh
RUN scripts/enable_ign_nightly.sh

RUN apt-get update \
&& apt-get install -y \
libignition-cmake2-dev \
libignition-common3-dev \
libignition-math6-eigen3-dev \
libignition-plugin-dev \
libignition-physics-dev \
libignition-rendering-dev \
libignition-tools-dev \
libignition-transport6-dev \
libignition-gui-dev \
libignition-msgs3-dev \
libignition-sensors-dev \
libsdformat8-dev

COPY . ign-gazebo
RUN cd ign-gazebo \
&& ./docker/scripts/build_ign_gazebo.sh

17 changes: 17 additions & 0 deletions docker/scripts/enable_gcc8.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -o errexit
set -o verbose

sudo apt-get install g++-8

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8

gcc -v
g++ -v
gcov -v

# lcov
git clone https://github.com/linux-test-project/lcov.git
cd lcov
sudo make install
8 changes: 8 additions & 0 deletions docker/scripts/enable_ign_nightly.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -o errexit
set -o verbose

sudo echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-nightly `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-nightly.list

wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
8 changes: 8 additions & 0 deletions docker/scripts/enable_ign_prerelease.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -o errexit
set -o verbose

sudo echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-prerelease `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-prerelease.list

wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
7 changes: 7 additions & 0 deletions docker/scripts/enable_ign_stable.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -o errexit
set -o verbose

sudo echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
31 changes: 31 additions & 0 deletions docker/scripts/install_common_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

set -o errexit
set -o verbose

sudo apt-get update

sudo apt-get install -y \
gnupg \
lsb-release \
software-properties-common \
wget

sudo apt-get install -y \
build-essential \
cmake \
curl \
git \
g++-8 \
mercurial \
pkg-config

sudo apt-get install -y \
cppcheck \
valgrind

sudo apt-get install -y \
python3 \
python3-dbg \
python3-pip \
python3-venv
66 changes: 66 additions & 0 deletions docker/scripts/install_ign_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/bash

set -o errexit
set -o verbose

sudo apt-get update

# Things that are used all over the ign stack
sudo apt-get install -y \
doxygen \
libboost-all-dev \
libbullet-dev \
libeigen3-dev \
libgflags-dev \
libtinyxml2-dev \
libprotoc-dev libprotobuf-dev \
protobuf-compiler \
ruby-ronn \
ruby-dev \
swig \
uuid-dev

# ign-common dependencies
sudo apt-get install -y \
libavcodec-dev \
libavdevice-dev \
libavformat-dev \
libavutil-dev \
libfreeimage-dev \
libgts-dev \
libswscale-dev

# ign-gui dependencies
sudo apt-get install -y \
qtbase5-dev \
qtdeclarative5-dev \
qtquickcontrols2-5-dev \
qml-module-qtquick2 \
qml-module-qtquick-controls \
qml-module-qtquick-controls2 \
qml-module-qtquick-dialogs \
qml-module-qtquick-layouts \
qml-module-qt-labs-folderlistmodel \
qml-module-qt-labs-settings \
qml-module-qtgraphicaleffects

# ign-rendering dependencies
sudo apt-get install -y \
libogre-1.9-dev \
libglew-dev \
libfreeimage-dev \
freeglut3-dev \
libxmu-dev \
libxi-dev

# ign-transport dependencies
sudo apt-get install -y \
libzmq3-dev \
libsqlite3-dev

# SDFormat dependencies
sudo apt-get install -y \
libxml2-dev

sudo apt-get clean

0 comments on commit 48357d8

Please sign in to comment.