Added initial sketch of dockerfile support
This commit is contained in:
18
Dockerfile.env
Normal file
18
Dockerfile.env
Normal file
@ -0,0 +1,18 @@
|
||||
FROM arm64v8/ros:jazzy as magrob.env
|
||||
|
||||
RUN mkdir -p /ros_ws/src
|
||||
WORKDIR /ros_ws/src
|
||||
|
||||
RUN --mount=type=bind,source=./,target=/ros_ws/src/ \
|
||||
--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 -i --from-paths . -y
|
||||
|
||||
RUN cat <<EOF >> /root/.bashrc
|
||||
source /opt/ros/jazzy/setup.bash
|
||||
EOF
|
||||
|
||||
CMD ["sleep", "infinity"]
|
||||
17
docker-compose.yaml
Normal file
17
docker-compose.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
services:
|
||||
magrob_base:
|
||||
network_mode: host
|
||||
image: localhost/magrob.env
|
||||
build:
|
||||
dockerfile: Dockerfile.env
|
||||
|
||||
entrypoint: ["sleep","infinity"]
|
||||
volumes:
|
||||
- ./:/ros_ws/src
|
||||
- /dev/shm:/dev/shm
|
||||
devices:
|
||||
- /dev/serial/by-id/usb-Mg_Robotics_Magrob_Odometry_MCU_E661AC8863809024-if00:/dev/ttyACM1
|
||||
- /dev/serial/by-id/usb-Raspberry_Pi_Pico_E662588817288C2E-if00:/dev/ttyACM0
|
||||
|
||||
profiles:
|
||||
- base
|
||||
Reference in New Issue
Block a user