-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 961 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 961 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
# ROS distribution to use (rolling | jazzy | humble, etc.)
ARG ROS_DISTRO=rolling
FROM ros:$ROS_DISTRO
# Update system
RUN apt-get update && apt-get upgrade -y
SHELL ["/bin/bash", "-c"]
# Create a workspace and copy packages
WORKDIR /ros2_ws
COPY comau_bringup src/comau_bringup
COPY comau_robots src/comau_robots
COPY crcopen_hardware src/crcopen_hardware
# Install CRCOpen ORLDriver
RUN apt-get install -y ./src/crcopen_hardware/lib/orl_driver-*.deb
# Install dependencies
RUN rosdep update && rosdep install --from-paths . -y --ignore-src
# Build the driver
RUN source /opt/ros/$ROS_DISTRO/setup.bash && colcon build
# Source ROS and driver packages in future shells
RUN echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> /etc/bash.bashrc
RUN echo "source /ros2_ws/install/setup.bash" >> /etc/bash.bashrc
# Keep the same entrypoint
COPY --chmod=755 ./entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["bash"]