forked from DFKI-NI/mir_robot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-noetic
35 lines (30 loc) · 1.4 KB
/
Dockerfile-noetic
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
FROM ros:noetic-ros-core
# python3-osrf-pycommon has to be installed manually for python3-catkin-tools to work (see https://github.com/catkin/catkin_tools/issues/594)
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential python3-rosdep python3-catkin-lint python3-catkin-tools python3-osrf-pycommon \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install pre-commit hooks to /root/.cache/pre-commit/
RUN apt-get update -qq \
&& apt-get install -y -qq --no-install-recommends git python3-pip ruby shellcheck clang-format-10 python3-catkin-lint \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install pre-commit
RUN mkdir -p /tmp/pre-commit
COPY .pre-commit-config.yaml /tmp/pre-commit/
RUN cd /tmp/pre-commit \
&& git init \
&& pre-commit install-hooks \
&& rm -rf /tmp/pre-commit
# Create ROS workspace
COPY . /ws/src/mir_robot
WORKDIR /ws
# Use rosdep to install all dependencies (including ROS itself)
RUN rosdep init \
&& rosdep update \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive rosdep install --from-paths src -i -y --rosdistro noetic \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && \
catkin init && \
catkin config --install -j 1 -p 1 && \
catkin build --limit-status-rate 0.1 --no-notify && \
catkin build --limit-status-rate 0.1 --no-notify --make-args tests"