-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 960 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (24 loc) · 960 Bytes
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
# OmniPlan Dockerfile
ARG ROS_DISTRO=jazzy
FROM ros:${ROS_DISTRO} AS deps
# Create workspace
WORKDIR /root/ros2_ws
SHELL ["/bin/bash", "-c"]
RUN mkdir -p src
# Copy OmniPlan source code
COPY . /root/ros2_ws/src/omni_plan
# Colin and OPTIC dependency symlink
RUN apt update && apt install libz3-dev coinor-libcbc3.1 -y
RUN ln -sf $(find /usr/lib -name 'libCbc.so.3.*' 2>/dev/null | head -1) /usr/lib/x86_64-linux-gnu/libCbc.so.3
# Import dependencies
RUN vcs import src < src/omni_plan/dependencies.repos
# Install ROS 2 and package dependencies
RUN rosdep update --include-eol-distros && rosdep install --from-paths src --ignore-src -r -y
# Build the ws (colcon)
FROM deps AS builder
ARG CMAKE_BUILD_TYPE=Release
RUN source /opt/ros/${ROS_DISTRO}/setup.bash && colcon build --symlink-install
# Source the ROS 2 setup file
RUN echo "source /root/ros2_ws/install/setup.bash" >> ~/.bashrc
# Run a default command, e.g., starting a bash shell
CMD ["bash"]