diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..087a023 --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..30557cf --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/sh +. install/setup.sh +ros2 launch mg_wheel_interface launch.py