From 165c3688ab06d6ff3c443987665b5ea50ac6a00b Mon Sep 17 00:00:00 2001 From: openhands Date: Sat, 15 Aug 2026 17:09:53 +0000 Subject: [PATCH] Standardize Docker compose to use COPY instead of volume mounts - Add COPY directive to Dockerfile to copy source into image - Change compose.yml build context to parent directory with explicit dockerfile path - Remove source volume mounts from compose.yml - Keep X11/privileged volumes where required for GUI/USB access - Fix incorrect directory names in Dockerfiles (matching repo name) - Fix incorrect service names in compose.yml (matching repo name) This PR was created by an AI agent (OpenHands) on behalf of mmmarinho. --- docker/Dockerfile | 3 ++- docker/compose.yml | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 88a933c..985f6e4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,4 +6,5 @@ ENV BASH_ENV="/etc/bash_env" RUN sudo apt-get update && sudo apt-get upgrade -y RUN python3 -m pip install --upgrade dqrobotics --break-system-packages RUN sudo sudo apt-get remove -y ros-jazzy-sas-robot-driver -RUN mkdir -p /root/sas_robot_driver_devel/src/ \ No newline at end of file +RUN mkdir -p /root/sas_robot_kinematics_devel/src/ +COPY . /root/sas_robot_kinematics_devel/src/sas_robot_kinematics \ No newline at end of file diff --git a/docker/compose.yml b/docker/compose.yml index fedcf71..fdeb0df 100644 --- a/docker/compose.yml +++ b/docker/compose.yml @@ -1,11 +1,11 @@ services: sas_robot_kinematics: - build: . - volumes: - - ../../sas_robot_kinematics:/root/sas_robot_kinematics_devel/src/sas_robot_kinematics + build: + context: .. + dockerfile: docker/Dockerfile command: /bin/bash -c " cd /root/sas_robot_kinematics_devel/src/ && ls . && colcon build && source install/setup.bash - && ros2 run sas_robot_kinematics sas_robot_kinematics_interface_example.py" \ No newline at end of file + && ros2 run sas_robot_kinematics sas_robot_kinematics_interface_example.py"