From 44fa2f16ab25cf39e591c79efa455900173de9a0 Mon Sep 17 00:00:00 2001 From: pimpest <82343504+pimpest@users.noreply.github.com> Date: Mon, 13 Jul 2026 22:13:47 +0200 Subject: [PATCH] Modified docker container for running locally --- Dockerfile | 2 +- docker-compose.prod.yaml | 37 +++++++++++++++++++++++++++++++++++++ docker-compose.yaml | 10 +++++----- 3 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 docker-compose.prod.yaml diff --git a/Dockerfile b/Dockerfile index 9df8837..a346087 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM ros:jazzy-perception ENV DEBIAN_FRONTEND=noninteractive # ---------- System dependencies ---------- -RUN apt-get update && apt-get upgrade && apt-get install -y \ +RUN apt-get update && apt-get upgrade -yq && apt-get install -yq \ python3-colcon-common-extensions \ python3-rosdep \ meson cmake \ diff --git a/docker-compose.prod.yaml b/docker-compose.prod.yaml new file mode 100644 index 0000000..b2fe803 --- /dev/null +++ b/docker-compose.prod.yaml @@ -0,0 +1,37 @@ +services: + toid: + image: localhost:5000/toid + build: . + container_name: toid + + privileged: true + network_mode: host + + volumes: + - ./:/ros_ws + - /dev/:/dev/ + - /sys/:/sys/ + - /run/udev/:/run/udev/ + + entrypoint: ["sleep","infinity"] + + profiles: + - base + + toid_forever: + image: localhost:5000/toid + build: . + container_name: toid + + restart: unless-stopped + + privileged: true + network_mode: host + + volumes: + - ./:/ros_ws + - /dev/:/dev/ + - /sys/:/sys/ + - /run/udev/:/run/udev/ + + entrypoint: ["bash", "-c", "source install/setup.bash && ros2 launch toid_navigation main.py use_lidar:=False use_mock:=False"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index b2fe803..53b8da8 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,11 +1,11 @@ services: toid: - image: localhost:5000/toid + image: toid build: . container_name: toid - privileged: true network_mode: host + ipc: host volumes: - ./:/ros_ws @@ -19,14 +19,14 @@ services: - base toid_forever: - image: localhost:5000/toid + image: toid build: . container_name: toid restart: unless-stopped - privileged: true network_mode: host + ipc: host volumes: - ./:/ros_ws @@ -34,4 +34,4 @@ services: - /sys/:/sys/ - /run/udev/:/run/udev/ - entrypoint: ["bash", "-c", "source install/setup.bash && ros2 launch toid_navigation main.py use_lidar:=False use_mock:=False"] \ No newline at end of file + entrypoint: ["bash", "-c", "source /opt/ros/jazzy/setup.bash && colcon build && source install/setup.bash && ros2 launch toid_navigation main.py use_lidar:=False use_mock:=True"]