-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_ros
84 lines (75 loc) · 2.55 KB
/
Dockerfile_ros
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
ARG IMAGE=ubuntu20.04
FROM ${IMAGE}
ENV DEBIAN_FRONTEND="noninteractive"
ARG ROS1_DISTRO=noetic
ARG ROS2_DISTRO=foxy
#
# Install necessary packages
#
RUN apt-get update && apt-get install -y \
apt-utils \
sudo \
curl \
gnupg2 \
python3 \
vim \
lsb-release \
locales && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
#
# ROS 1 installation
#
RUN sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' && \
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
RUN apt-get update && apt-get install -y \
ros-$ROS1_DISTRO-desktop-full \
python3-rosdep \
python3-rosinstall-generator \
python3-vcstool \
build-essential && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
#
# ROS 2 installation
#
RUN sudo locale-gen en_US en_US.UTF-8 && \
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
export LANG=en_US.UTF-8 && \
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - && \
sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
RUN apt-get update && apt-get install -y \
ros-$ROS2_DISTRO-desktop \
ros-$ROS2_DISTRO-rqt \
ros-$ROS2_DISTRO-rmw-cyclonedds-cpp \
ros-$ROS2_DISTRO-ros1-bridge \
python3-colcon-common-extensions \
python3-vcstool \
python3-pip && \
pip3 install -U argcomplete && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
#
# ROS dependency
#
RUN apt-get update && apt-get install -y \
python3-rosdep \
build-essential \
cmake \
git && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
RUN sudo rosdep init && \
rosdep update
#
# Neuron Library
#
RUN curl -L --insecure https://neuron.adlinktech.com/debian/repo_signing.key | sudo apt-key add - && \
echo 'Acquire::https::neuron.adlinktech.com::Verify-Peer "false";' | sudo tee /etc/apt/apt.conf.d/99roscube > /dev/null && \
echo 'Acquire::https::neuron.adlinktech.com::Verify-Host "false";' | sudo tee -a /etc/apt/apt.conf.d/99roscube > /dev/null && \
echo "deb [arch=$(dpkg --print-architecture)] https://neuron.adlinktech.com/debian/common $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/roscube.list > /dev/null && \
sudo apt-get update && \
sudo apt-get -y install neuron-library && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
CMD ["/bin/bash"]