-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
ARG ROS_DISTRO | ||
ARG UBUNTU_VERSION | ||
FROM osrf/ros:${ROS_DISTRO}-desktop-${UBUNTU_VERSION} | ||
|
||
RUN echo "deb http://packages.ros.org/ros-testing/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list | ||
RUN apt-get update && apt-get install -y wget git | ||
RUN wget http://packages.ros.org/ros.key -O - | apt-key add - | ||
|
||
RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y \ | ||
python-catkin-tools \ | ||
python-pip \ | ||
python-rosdep \ | ||
python-setuptools \ | ||
python-wstool | ||
|
||
RUN pip install 'pip==9.0.3' && \ | ||
pip install 'setuptools==44.1.0' | ||
|
||
ARG ROS_DISTRO | ||
RUN cd ~ && \ | ||
mkdir -p ros/${ROS_DISTRO}/src && \ | ||
cd ros/${ROS_DISTRO}/src && \ | ||
wstool init && \ | ||
wstool set jsk-ros-pkg/jsk_visualization https://github.com/jsk-ros-pkg/jsk_visualization.git -v master --git -y && \ | ||
wstool up -j 2 | ||
|
||
RUN rosdep update --include-eol-distros | ||
|
||
# /opt/ros/${ROS_DISTRO}/share can be changed after rosdep install, so we run it 3 times. | ||
RUN for i in $(seq 3); do rosdep install --rosdistro ${ROS_DISTRO} -r -y -i --from-paths /opt/ros/${ROS_DISTRO}/share ~/ros/${ROS_DISTRO}/src; done | ||
|
||
RUN . /opt/ros/${ROS_DISTRO}/setup.sh && \ | ||
cd ~/ros/${ROS_DISTRO} && \ | ||
catkin build; \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
[[ ${DOCKER_TAG} =~ ([a-z]+)-([0-9a-z.]+)$ ]] | ||
ROS_DISTRO=${BASH_REMATCH[1]}; | ||
|
||
if [[ ${ROS_DISTRO} = "kinetic" ]]; then | ||
UBUNTU_VERSION="xenial"; | ||
elif [[ ${ROS_DISTRO} = "indigo" ]]; then | ||
UBUNTU_VERSION="trusty"; | ||
fi | ||
|
||
docker build --build-arg ROS_DISTRO=${ROS_DISTRO} \ | ||
--build-arg UBUNTU_VERSION=${UBUNTU_VERSION} \ | ||
-t ${IMAGE_NAME} . |