Added docker file

This commit is contained in:
2024-12-18 12:10:10 +01:00
parent 767d3f91c8
commit 143b8c5a47
2 changed files with 28 additions and 0 deletions

25
Dockerfile Normal file
View File

@ -0,0 +1,25 @@
FROM arm64v8/ros:jazzy AS dev
RUN mkdir -p /ros_ws/src/mg_wheel_interface
WORKDIR /ros_ws/src
COPY mg_wheel_interface/package.xml mg_wheel_interface/
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
. /opt/ros/jazzy/setup.sh && \
apt update && \
apt-get install -y ros-jazzy-hardware-interface && \
rosdep install --from-paths ./ -i -y && \
rm -rf ./mg_wheel_interface
FROM dev AS build
COPY . ./
RUN . /opt/ros/jazzy/setup.sh && colcon build --symlink-install &&\
chmod +x entrypoint.sh
CMD ["./entrypoint.sh"]

3
entrypoint.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
. install/setup.sh
ros2 launch mg_wheel_interface launch.py