-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
31 lines (18 loc) · 903 Bytes
/
Dockerfile
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
FROM ros:melodic-ros-base
RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
RUN apt update
RUN apt install -y ros-melodic-tf* \
ros-melodic-pcl-ros \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /root
# ROS setting
RUN /bin/bash -c "mkdir -p catkin_ws/src"
RUN cd catkin_ws/src && /bin/bash -c "source /opt/ros/melodic/setup.bash; catkin_init_workspace"
RUN cd catkin_ws && /bin/bash -c "source /opt/ros/melodic/setup.bash; catkin_make"
RUN cd /root && echo source /root/catkin_ws/devel/setup.bash >> .bashrc
ENV ROS_PACKAGE_PATH=/root/catkin_ws:$ROS_PACKAGE_PATH
ENV ROS_WORKSPACE=/root/catkin_ws
RUN ln -sf /usr/include/eigen3/Eigen /usr/include/Eigen
# clone repository
WORKDIR /root