Created
March 29, 2019 15:24
-
-
Save mikaelarguedas/f1f5b59f65f051f0879b49e271bc7b92 to your computer and use it in GitHub Desktop.
Crystal ros_core using rosinstall_generator
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
ARG FROM_IMAGE=ubuntu:bionic | |
FROM $FROM_IMAGE | |
# setup timezone | |
RUN echo 'Etc/UTC' > /etc/timezone && \ | |
ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime && \ | |
apt-get update && apt-get install -q -y tzdata && rm -rf /var/lib/apt/lists/* | |
# install packages | |
RUN apt-get update && apt-get install -q -y \ | |
bash-completion \ | |
dirmngr \ | |
gnupg2 \ | |
lsb-release \ | |
python3-pip \ | |
&& rm -rf /var/lib/apt/lists/* | |
# setup keys | |
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA116 | |
# setup sources.list | |
RUN echo "deb http://packages.ros.org/ros2/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros2-latest.list | |
# setup environment | |
ENV LANG C.UTF-8 | |
ENV LC_ALL C.UTF-8 | |
# install bootstrap tools | |
RUN apt-get update && apt-get install --no-install-recommends -y \ | |
git \ | |
python3-colcon-common-extensions \ | |
python3-rosdep \ | |
python3-vcstool \ | |
&& rm -rf /var/lib/apt/lists/* | |
# install python packages | |
RUN pip3 install -U \ | |
rosinstall_generator | |
# bootstrap rosdep | |
RUN rosdep init \ | |
&& rosdep update | |
# clone source | |
ENV ROS2_WS /opt/ros2_ws | |
RUN mkdir -p $ROS2_WS/src | |
WORKDIR $ROS2_WS | |
RUN rosinstall_generator ros_core --rosdistro crystal --deps > ros_core.install && \ | |
vcs import src < ros_core.install | |
RUN rosdep update \ | |
&& apt-get -qq update \ | |
&& rosdep install \ | |
--from-paths src \ | |
--ignore-src \ | |
--skip-keys "rti-connext-dds-5.3.1 libopensplice69" \ | |
--rosdistro crystal -y | |
RUN colcon build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment