-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathDockerfile
More file actions
63 lines (51 loc) · 1.59 KB
/
Dockerfile
File metadata and controls
63 lines (51 loc) · 1.59 KB
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
# Base ROS image
FROM ros:noetic-ros-core
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV ROS_DISTRO=noetic
# Install dependencies and Pinocchio
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
ros-noetic-dynamic-reconfigure \
libeigen3-dev \
ros-$ROS_DISTRO-plotjuggler-ros \
ros-${ROS_DISTRO}-pinocchio \
ros-${ROS_DISTRO}-rviz \
python3-catkin-tools \
python3-catkin-pkg \
python3-rospkg \
cmake \
python3-rosdep \
libgl1-mesa-dev \
libgl1-mesa-dri \
libgl1-mesa-glx \
libglu1-mesa \
freeglut3-dev \
&& rm -rf /var/lib/apt/lists/*
ENV LIBGL_ALWAYS_SOFTWARE=1
# create and initialize a catkin workspace
WORKDIR /home/dev_ws
RUN mkdir -p catkin_ws/src
# # clone kiss-icp ROS wrappers (v0.3.0)
WORKDIR /home/dev_ws/catkin_ws/src
RUN git clone --branch v0.3.0 https://github.com/PRBonn/kiss-icp.git
# install any remaining ROS dependencies
WORKDIR /home/dev_ws/catkin_ws
RUN \
rosdep init || true && \
rosdep update && \
rosdep install --from-paths src --ignore-src -r -y
# build the workspace
RUN /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash && \
catkin build"
# automatically source both ROS and your workspace on container start
SHELL ["/bin/bash", "-c"]
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc && \
echo "source /home/dev_ws/catkin_ws/devel/setup.bash" >> ~/.bashrc
# create a safe runtime dir for Qt
RUN mkdir -p /tmp/runtime-root && chmod 700 /tmp/runtime-root
ENV XDG_RUNTIME_DIR=/tmp/runtime-root
# default to bash
CMD ["bash"]