diff --git a/ros-base/Dockerfile b/ros-base/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..007de72320b0cd5b8f056fe579c9bac656cebf5e --- /dev/null +++ b/ros-base/Dockerfile @@ -0,0 +1,32 @@ +# Derive from Ubuntu Bionic +FROM ubuntu:bionic + +# Configuration variables +ENV ROS_VERSION_NAME dashing + +# 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/* + +# Add ROS 2 repositories +RUN apt-get update && apt-get install -q -y \ + curl \ + gnupg2 \ + lsb-release \ + && curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - \ + && sh -c 'echo "deb [arch=amd64,arm64] http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list' \ + && apt-get remove -y -q \ + curl \ + gnupg2 \ + lsb-release \ + && rm -rf /var/lib/apt/lists/* + +# Install bare bones ROS Installation +RUN apt-get update && apt-get install -q -y \ + ros-$ROS_VERSION_NAME-ros-base \ + && rm -rf /var/lib/apt/lists/* + +# Add source command to root user bashrc +RUN echo "source /opt/ros/$ROS_VERSION_NAME/setup.bash" >> ~/.bashrc