Skip to content

Instantly share code, notes, and snippets.

@ruffsl
Created September 19, 2018 06:14
Show Gist options
  • Save ruffsl/bb3b626c170942ba6fd1857053e30e3a to your computer and use it in GitHub Desktop.
Save ruffsl/bb3b626c170942ba6fd1857053e30e3a to your computer and use it in GitHub Desktop.
Docker image for ROS2 armhf from source
# This is an auto generated Dockerfile for ros2:source
# generated from docker_images/create_ros2_source_image.Dockerfile.em
FROM arm32v7/ubuntu:bionic
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 \
git \
gnupg2 \
libasio-dev \
libtinyxml2-dev \
lsb-release \
python3-pip \
wget \
&& 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 . /etc/os-release \
&& echo "deb http://repo.ros2.org/$ID/main `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 python packages
RUN pip3 install -U \
argcomplete \
flake8 \
flake8-blind-except \
flake8-builtins \
flake8-class-newline \
flake8-comprehensions \
flake8-deprecated \
flake8-docstrings \
flake8-import-order \
flake8-quotes \
pytest-repeat \
pytest-rerunfailures
# install packages from the ROS repositories
RUN pip3 install -U \
catkin_pkg_modules \
colcon_common_extensions \
rosdep \
rosinstall_generator \
vcstool
# bootstrap rosdep
ENV ROSDISTRO_INDEX_URL https://raw.githubusercontent.com/ros2/rosdistro/ros2/index.yaml
RUN rosdep init \
&& rosdep update
# clone source
ENV ROS2_WS /root/ros2_ws
RUN mkdir -p $ROS2_WS/src
WORKDIR $ROS2_WS
# RUN rosinstall_generator \
# demo_nodes_cpp \
# demo_nodes_py \
# sros2 \
# --deps \
# --rosdistro bouncy > ros2.repos \
# && vcs import src < ros2.repos
COPY ./ros2.repo ./
RUN vcs import src < ros2.repo
# install dependencies
RUN apt-get update && rosdep install -y \
--from-paths src \
--ignore-src \
--rosdistro bouncy \
--skip-keys "console_bridge fastcdr fastrtps libopensplice67 rti-connext-dds-5.3.1 urdfdom_headers python3-catkin-pkg-modules python3-colcon-common-extensions python3-rosdep python3-vcstool" \
&& rm -rf /var/lib/apt/lists/*
# build source
WORKDIR $ROS2_WS
RUN colcon \
build \
--cmake-args -DSECURITY=ON --no-warn-unused-cli \
--symlink-install
# setup bashrc
RUN cp /etc/skel/.bashrc ~/
# setup entrypoint
COPY ./ros2_source_entrypoint.sh /
ENTRYPOINT ["/ros2_source_entrypoint.sh"]
CMD ["bash"]
repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: 0.5.1
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: 0.5.1
ament/ament_lint:
type: git
url: https://github.com/ament/ament_lint.git
version: 0.5.2
ament/ament_package:
type: git
url: https://github.com/ament/ament_package.git
version: 0.5.2
ament/ament_tools:
type: git
url: https://github.com/ament/ament_tools.git
version: 0.5.0
ament/googletest:
type: git
url: https://github.com/ament/googletest.git
version: 4b6e624e78ba3d43c1602ffc80478ee7253e0b04
ament/osrf_pycommon:
type: git
url: https://github.com/osrf/osrf_pycommon.git
version: 0.1.5
ament/uncrustify:
type: git
url: https://github.com/ament/uncrustify.git
version: 0.66.1
eProsima/Fast-CDR:
type: git
url: https://github.com/eProsima/Fast-CDR.git
version: v1.0.7
eProsima/Fast-RTPS:
type: git
url: https://github.com/eProsima/Fast-RTPS.git
version: 7a0b0fe7ca8d2c4ea41e36744c6024c263a6505a
osrf/osrf_testing_tools_cpp:
type: git
url: https://github.com/osrf/osrf_testing_tools_cpp.git
version: 1.0.0
ros/class_loader:
type: git
url: https://github.com/ros/class_loader.git
version: 1.1.0
ros/console_bridge:
type: git
url: https://github.com/ros/console_bridge.git
version: ad25f7307da76be2857545e7e5c2a20727eee542
ros/pluginlib:
type: git
url: https://github.com/ros/pluginlib.git
version: 2.1.1
ros/resource_retriever:
type: git
url: https://github.com/ros/resource_retriever.git
version: 2.1.0
ros/ros_environment:
type: git
url: https://github.com/ros/ros_environment.git
version: 2.1.1
ros/urdfdom_headers:
type: git
url: https://github.com/ros/urdfdom_headers.git
version: e7e0972a4617b8a5df7a274ea3ba3b92e3895a35
ros-perception/laser_geometry:
type: git
url: https://github.com/ros-perception/laser_geometry.git
version: 2.0.0
ros-planning/navigation_msgs:
type: git
url: https://github.com/ros-planning/navigation_msgs.git
version: 2.0.0
ros2/ament_cmake_ros:
type: git
url: https://github.com/ros2/ament_cmake_ros.git
version: 0.5.0
ros2/common_interfaces:
type: git
url: https://github.com/ros2/common_interfaces.git
version: 0.5.1
ros2/demos:
type: git
url: https://github.com/ros2/demos.git
version: 0.5.1
ros2/examples:
type: git
url: https://github.com/ros2/examples.git
version: 0.5.1
ros2/example_interfaces:
type: git
url: https://github.com/ros2/example_interfaces.git
version: 0.5.0
ros2/geometry2:
type: git
url: https://github.com/ros2/geometry2.git
version: 0.9.1
ros2/kdl_parser:
type: git
url: https://github.com/ros2/kdl_parser.git
version: 2.1.0
ros2/launch:
type: git
url: https://github.com/ros2/launch.git
version: 0.6.0
ros2/libyaml_vendor:
type: git
url: https://github.com/ros2/libyaml_vendor.git
version: 1.0.0
ros2/orocos_kinematics_dynamics:
type: git
url: https://github.com/ros2/orocos_kinematics_dynamics.git
version: 3.0.1
ros2/poco_vendor:
type: git
url: https://github.com/ros2/poco_vendor.git
version: 1.1.1
ros2/rcl:
type: git
url: https://github.com/ros2/rcl.git
version: 0.5.1
ros2/rcl_interfaces:
type: git
url: https://github.com/ros2/rcl_interfaces.git
version: 0.5.0
# ros2/rclc:
# type: git
# url: https://github.com/ros2/rclc.git
# version: master
ros2/rclcpp:
type: git
url: https://github.com/ros2/rclcpp.git
version: 0.5.1
ros2/rclpy:
type: git
url: https://github.com/ros2/rclpy.git
version: 0.5.4
ros2/rcutils:
type: git
url: https://github.com/ros2/rcutils.git
version: 0.5.1
ros2/realtime_support:
type: git
url: https://github.com/ros2/realtime_support.git
version: 0.5.0
ros2/rmw:
type: git
url: https://github.com/ros2/rmw.git
version: 0.5.0
ros2/rmw_connext:
type: git
url: https://github.com/ros2/rmw_connext.git
version: 0.5.1
ros2/rmw_fastrtps:
type: git
url: https://github.com/ros2/rmw_fastrtps.git
version: 0.5.1
ros2/rmw_implementation:
type: git
url: https://github.com/ros2/rmw_implementation.git
version: 0.5.1
ros2/rmw_opensplice:
type: git
url: https://github.com/ros2/rmw_opensplice.git
version: 0.5.2
ros2/robot_state_publisher:
type: git
url: https://github.com/ros2/robot_state_publisher.git
version: 2.1.0
# ros2/ros1_bridge:
# type: git
# url: https://github.com/ros2/ros1_bridge.git
# version: 0.5.1
ros2/ros2cli:
type: git
url: https://github.com/ros2/ros2cli.git
version: 0.5.4
ros2/rosidl:
type: git
url: https://github.com/ros2/rosidl.git
version: 0.5.1
ros2/rosidl_dds:
type: git
url: https://github.com/ros2/rosidl_dds.git
version: 0.5.0
ros2/rosidl_defaults:
type: git
url: https://github.com/ros2/rosidl_defaults.git
version: 0.5.0
ros2/rosidl_python:
type: git
url: https://github.com/ros2/rosidl_python.git
version: 0.5.2
ros2/rosidl_typesupport:
type: git
url: https://github.com/ros2/rosidl_typesupport.git
version: 0.5.0
ros2/rosidl_typesupport_connext:
type: git
url: https://github.com/ros2/rosidl_typesupport_connext.git
version: 0.5.3
ros2/rosidl_typesupport_opensplice:
type: git
url: https://github.com/ros2/rosidl_typesupport_opensplice.git
version: 0.5.0
# ros2/rviz:
# type: git
# url: https://github.com/ros2/rviz.git
# version: 4.0.2
ros2/sros2:
type: git
url: https://github.com/ros2/sros2.git
version: 0.5.0
ros2/tinyxml_vendor:
type: git
url: https://github.com/ros2/tinyxml_vendor.git
version: 0.5.0
ros2/tinyxml2_vendor:
type: git
url: https://github.com/ros2/tinyxml2_vendor.git
version: 0.4.0
ros2/tlsf:
type: git
url: https://github.com/ros2/tlsf.git
version: 0.5.0
# ros2/tutorials:
# type: git
# url: https://github.com/ros2/tutorials.git
# version: master
ros2/urdf:
type: git
url: https://github.com/ros2/urdf.git
version: 2.1.0
ros2/urdfdom:
type: git
url: https://github.com/ros2/urdfdom.git
version: 2.0.0
#!/bin/bash
set -e
# setup ros2 environment
source "$ROS2_WS/install/local_setup.bash"
exec "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment