-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathDockerfile.ros2-base
51 lines (43 loc) · 1.38 KB
/
Dockerfile.ros2-base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM timongentzsch/l4t-ubuntu20-opencv
ARG DEBIAN_FRONTEND=noninteractive
ARG ROS_PKG=ros_base
ARG ROS_DISTRO=foxy
ARG ROS_ROOT=/opt/ros/${ROS_DISTRO}
#
# change the locale from POSIX to UTF-8
#
RUN apt-get update && \
apt-get install -y --no-install-recommends \
locales \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
RUN locale-gen en_US en_US.UTF-8 && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV PYTHONIOENCODING=utf-8
#
# add the ROS deb repo to the apt sources list
#
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
wget \
gnupg2 \
lsb-release \
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null
#
# install ros2 packages
#
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ros-${ROS_DISTRO}-ros-base \
python3-colcon-common-extensions \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# source ROS
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /root/.bashrc
CMD ["bash"]
WORKDIR /root