forked from CCNYRoboticsLab/imu_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-foxy
29 lines (24 loc) · 1.03 KB
/
Dockerfile-foxy
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
FROM ros:foxy-ros-core
RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential file clang-format python3-colcon-common-extensions python3-rosdep \
&& rm -rf /var/lib/apt/lists/*
# 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 clang-format 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/imu_tools
WORKDIR /ws
# Use rosdep to install all dependencies (including ROS itself)
RUN rosdep init && rosdep update && apt-get update && rosdep install --from-paths src -i -y --rosdistro foxy \
&& rm -rf /var/lib/apt/lists/*
RUN /bin/bash -c "source /opt/ros/foxy/setup.bash && \
colcon build --parallel-workers 1 && \
colcon test --parallel-workers 1"