Skip to content
Snippets Groups Projects
Commit 638307dc authored by xia0ben's avatar xia0ben
Browse files

Add ros-base Dockerfile

parent c940e258
No related branches found
No related tags found
No related merge requests found
# 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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment