From 433fa9a535dcef7e79d001679635dadce7c1d0d5 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Tue, 3 Mar 2026 17:56:55 +0000 Subject: [PATCH 01/24] feat: add cyclone dds support --- base.dockerfile | 7 ++++++- cuda.dockerfile | 7 ++++++- docker/cyclonedds.xml | 10 ++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 docker/cyclonedds.xml diff --git a/base.dockerfile b/base.dockerfile index 9eda8c9..708f27f 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -18,6 +18,7 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \ wget \ unzip \ ros-${ROS_DISTRO}-ros-base \ + ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ python3-colcon-common-extensions \ && rm -rf /var/lib/apt/lists/* @@ -37,12 +38,16 @@ RUN groupadd --gid $USER_GID $USERNAME \ && chmod 0440 /etc/sudoers.d/$USERNAME \ && rm -rf /var/lib/apt/lists/* +COPY ./docker/cyclonedds.xml /etc/cyclonedds.xml + # Configure bash profile RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root/.bashrc && \ echo 'PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "' >> /etc/bash.bashrc && \ echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /etc/bash.bashrc && \ echo "alias t='tmux'" >> /etc/bash.bashrc && \ - echo "alias cls='clear'" >> /etc/bash.bashrc + echo "alias cls='clear'" >> /etc/bash.bashrc && \ + echo "RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> /etc/bash.bashrc && \ + echo "CYCLONEDDS_URI=file:///etc/cyclonedds.xml" >> /etc/bash.bashrc CMD ["bash", "-l"] diff --git a/cuda.dockerfile b/cuda.dockerfile index 3093ba2..6e99ea4 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -39,9 +39,12 @@ RUN add-apt-repository universe \ RUN apt-get update && apt-get install -y --no-install-recommends \ ros-${ROS_DISTRO}-ros-base \ + ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ python3-rosdep \ && rm -rf /var/lib/apt/lists/* +COPY ./docker/cyclonedds.xml /etc/cyclonedds.xml + RUN . /opt/ros/${ROS_DISTRO}/setup.sh && rosdep init && rosdep update # Setup VirtualGL @@ -68,7 +71,9 @@ RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root echo 'PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "' >> /etc/bash.bashrc && \ echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /etc/bash.bashrc && \ echo "alias t='tmux'" >> /etc/bash.bashrc && \ - echo "alias cls='clear'" >> /etc/bash.bashrc + echo "alias cls='clear'" >> /etc/bash.bashrc && \ + echo "RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> /etc/bash.bashrc && \ + echo "CYCLONEDDS_URI=file:///etc/cyclonedds.xml" >> /etc/bash.bashrc ENV TVNC_VGL=1 ENV VGL_ISACTIVE=1 diff --git a/docker/cyclonedds.xml b/docker/cyclonedds.xml new file mode 100644 index 0000000..82132ff --- /dev/null +++ b/docker/cyclonedds.xml @@ -0,0 +1,10 @@ + + + + true + + + auto + + + \ No newline at end of file From 73c5495d05d16f5d9b2c90059575fa887571c135 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Tue, 3 Mar 2026 18:01:36 +0000 Subject: [PATCH 02/24] fix: correct path --- base.dockerfile | 2 +- cuda.dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base.dockerfile b/base.dockerfile index 708f27f..373d682 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -38,7 +38,7 @@ RUN groupadd --gid $USER_GID $USERNAME \ && chmod 0440 /etc/sudoers.d/$USERNAME \ && rm -rf /var/lib/apt/lists/* -COPY ./docker/cyclonedds.xml /etc/cyclonedds.xml +COPY docker/cyclonedds.xml /etc/cyclonedds.xml # Configure bash profile RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root/.bashrc && \ diff --git a/cuda.dockerfile b/cuda.dockerfile index 6e99ea4..bcac7f5 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -43,7 +43,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3-rosdep \ && rm -rf /var/lib/apt/lists/* -COPY ./docker/cyclonedds.xml /etc/cyclonedds.xml +COPY docker/cyclonedds.xml /etc/cyclonedds.xml RUN . /opt/ros/${ROS_DISTRO}/setup.sh && rosdep init && rosdep update From 66e284edf18f013dd00cea043942fb27f74964c8 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Tue, 3 Mar 2026 18:06:27 +0000 Subject: [PATCH 03/24] fix: update path to match context not sure if this is the right way of doing this or not --- base.dockerfile | 2 +- cuda.dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base.dockerfile b/base.dockerfile index 373d682..0aa5c74 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -38,7 +38,7 @@ RUN groupadd --gid $USER_GID $USERNAME \ && chmod 0440 /etc/sudoers.d/$USERNAME \ && rm -rf /var/lib/apt/lists/* -COPY docker/cyclonedds.xml /etc/cyclonedds.xml +COPY cyclonedds.xml /etc/cyclonedds.xml # Configure bash profile RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root/.bashrc && \ diff --git a/cuda.dockerfile b/cuda.dockerfile index bcac7f5..10cf513 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -43,7 +43,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3-rosdep \ && rm -rf /var/lib/apt/lists/* -COPY docker/cyclonedds.xml /etc/cyclonedds.xml +COPY cyclonedds.xml /etc/cyclonedds.xml RUN . /opt/ros/${ROS_DISTRO}/setup.sh && rosdep init && rosdep update From c2666828d4cc7c33e24503c3aea795397b4d06e1 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Tue, 3 Mar 2026 18:21:26 +0000 Subject: [PATCH 04/24] fix: isolate cyclonedds steps --- base.dockerfile | 9 +++++++-- cuda.dockerfile | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/base.dockerfile b/base.dockerfile index 0aa5c74..d872173 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -12,16 +12,16 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get upgrade -y && apt-get install -y \ build-essential \ + ca-certificates \ cmake \ git \ curl \ wget \ unzip \ ros-${ROS_DISTRO}-ros-base \ - ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ python3-colcon-common-extensions \ && rm -rf /var/lib/apt/lists/* - + RUN . /opt/ros/${ROS_DISTRO}/setup.sh && rosdep update ARG USERNAME=ros @@ -38,6 +38,10 @@ RUN groupadd --gid $USER_GID $USERNAME \ && chmod 0440 /etc/sudoers.d/$USERNAME \ && rm -rf /var/lib/apt/lists/* +# Cyclone DDS +RUN apt-get update && apt-get upgrade -y && apt-get install -y \ + ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ + && rm -rf /var/lib/apt/lists/* COPY cyclonedds.xml /etc/cyclonedds.xml # Configure bash profile @@ -49,5 +53,6 @@ RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root echo "RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> /etc/bash.bashrc && \ echo "CYCLONEDDS_URI=file:///etc/cyclonedds.xml" >> /etc/bash.bashrc +USER ros CMD ["bash", "-l"] diff --git a/cuda.dockerfile b/cuda.dockerfile index 10cf513..3b591bc 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -17,6 +17,7 @@ RUN apt-get update ; \ apt-get install -y --no-install-recommends \ locales \ curl \ + ca-certificates \ gnupg2 \ lsb-release \ git \ @@ -39,10 +40,13 @@ RUN add-apt-repository universe \ RUN apt-get update && apt-get install -y --no-install-recommends \ ros-${ROS_DISTRO}-ros-base \ - ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ python3-rosdep \ && rm -rf /var/lib/apt/lists/* +# Cyclone DDS +RUN apt-get update && apt-get upgrade -y && apt-get install -y \ + ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ + && rm -rf /var/lib/apt/lists/* COPY cyclonedds.xml /etc/cyclonedds.xml RUN . /opt/ros/${ROS_DISTRO}/setup.sh && rosdep init && rosdep update From a08160bfcde278a89c2624e0d3ee1cce6564a878 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Tue, 3 Mar 2026 18:31:29 +0000 Subject: [PATCH 05/24] ci: maybe apt clean will fix this? --- base.dockerfile | 3 ++- cuda.dockerfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/base.dockerfile b/base.dockerfile index d872173..adda351 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -10,7 +10,8 @@ ENV ROS_DISTRO=${ROS_DISTRO} ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get upgrade -y && apt-get install -y \ +RUN apt-get clean && rm -rf /var/cache/apt/archives/* &&\ + apt-get update && apt-get upgrade -y && apt-get install -y \ build-essential \ ca-certificates \ cmake \ diff --git a/cuda.dockerfile b/cuda.dockerfile index 3b591bc..1a228d8 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -12,7 +12,8 @@ ENV ROS_DISTRO=${ROS_DISTRO} ENV DEBIAN_FRONTEND=noninteractive # Install language -RUN apt-get update ; \ +RUN apt-get clean && rm -rf /var/cache/apt/archives/* && \ + apt-get update ; \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ locales \ From 2cd9a89bfcae34f4d777088699e1908fc3f7a7ea Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Tue, 3 Mar 2026 18:55:20 +0000 Subject: [PATCH 06/24] fix: update bashrc to work better --- base.dockerfile | 3 ++- cuda.dockerfile | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/base.dockerfile b/base.dockerfile index adda351..c1e8107 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -47,6 +47,7 @@ COPY cyclonedds.xml /etc/cyclonedds.xml # Configure bash profile RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root/.bashrc && \ + echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /home/${USERNAME}/.bashrc && \ echo 'PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "' >> /etc/bash.bashrc && \ echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /etc/bash.bashrc && \ echo "alias t='tmux'" >> /etc/bash.bashrc && \ @@ -54,6 +55,6 @@ RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root echo "RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> /etc/bash.bashrc && \ echo "CYCLONEDDS_URI=file:///etc/cyclonedds.xml" >> /etc/bash.bashrc -USER ros +USER ${USERNAME} CMD ["bash", "-l"] diff --git a/cuda.dockerfile b/cuda.dockerfile index 1a228d8..e9b9d52 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -73,6 +73,7 @@ RUN groupadd --gid $USER_GID $USERNAME \ # Configure bash profile RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root/.bashrc && \ + echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /home/${USERNAME}/.bashrc && \ echo 'PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "' >> /etc/bash.bashrc && \ echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /etc/bash.bashrc && \ echo "alias t='tmux'" >> /etc/bash.bashrc && \ @@ -90,5 +91,7 @@ ENV VGL_PROBEGLX=0 ENV LD_PRELOAD=/usr/lib/libdlfaker.so:/usr/lib/libvglfaker.so ENV SHELL=/bin/bash +USER ${USERNAME} + CMD ["bash", "-l"] From 6c3b7edb48d4a8a2166e2c61f283f01bb87a1399 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 9 Mar 2026 14:10:09 +0000 Subject: [PATCH 07/24] ci: fake commit to trigger build --- cuda.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuda.dockerfile b/cuda.dockerfile index e9b9d52..86e86fb 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -18,6 +18,7 @@ RUN apt-get clean && rm -rf /var/cache/apt/archives/* && \ apt-get install -y --no-install-recommends \ locales \ curl \ + wget \ ca-certificates \ gnupg2 \ lsb-release \ @@ -25,7 +26,6 @@ RUN apt-get clean && rm -rf /var/cache/apt/archives/* && \ nano \ python3-setuptools \ software-properties-common \ - wget \ tzdata \ && locale-gen en_US.UTF-8 \ && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \ From ebc991f74da78814a39e2158872d6304b04bf599 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 9 Mar 2026 14:21:19 +0000 Subject: [PATCH 08/24] chore: mv cyclone install to same block --- base.dockerfile | 28 ++++++++++++++-------------- cuda.dockerfile | 6 ++---- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/base.dockerfile b/base.dockerfile index c1e8107..f9127e3 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -11,7 +11,9 @@ ENV ROS_DISTRO=${ROS_DISTRO} ENV DEBIAN_FRONTEND=noninteractive RUN apt-get clean && rm -rf /var/cache/apt/archives/* &&\ - apt-get update && apt-get upgrade -y && apt-get install -y \ + apt-get update && apt-get upgrade -y + +RUN apt-get install -y \ build-essential \ ca-certificates \ cmake \ @@ -20,9 +22,10 @@ RUN apt-get clean && rm -rf /var/cache/apt/archives/* &&\ wget \ unzip \ ros-${ROS_DISTRO}-ros-base \ + ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ python3-colcon-common-extensions \ && rm -rf /var/lib/apt/lists/* - + RUN . /opt/ros/${ROS_DISTRO}/setup.sh && rosdep update ARG USERNAME=ros @@ -31,20 +34,17 @@ ARG USER_GID=$USER_UID # Create a non-root user RUN groupadd --gid $USER_GID $USERNAME \ - && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ - # Add sudo support for the non-root user - && apt-get update \ - && apt-get install -y --no-install-recommends sudo \ - && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\ - && chmod 0440 /etc/sudoers.d/$USERNAME \ - && rm -rf /var/lib/apt/lists/* - -# Cyclone DDS -RUN apt-get update && apt-get upgrade -y && apt-get install -y \ - ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ + && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ + # Add sudo support for the non-root user + && apt-get update \ + && apt-get install -y --no-install-recommends sudo \ + && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\ + && chmod 0440 /etc/sudoers.d/$USERNAME \ && rm -rf /var/lib/apt/lists/* + +# Cyclone DDS Config COPY cyclonedds.xml /etc/cyclonedds.xml - + # Configure bash profile RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root/.bashrc && \ echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /home/${USERNAME}/.bashrc && \ diff --git a/cuda.dockerfile b/cuda.dockerfile index 86e86fb..fab521e 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -42,12 +42,10 @@ RUN add-apt-repository universe \ RUN apt-get update && apt-get install -y --no-install-recommends \ ros-${ROS_DISTRO}-ros-base \ python3-rosdep \ - && rm -rf /var/lib/apt/lists/* - -# Cyclone DDS -RUN apt-get update && apt-get upgrade -y && apt-get install -y \ ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ && rm -rf /var/lib/apt/lists/* + +# Cyclone DDS Config COPY cyclonedds.xml /etc/cyclonedds.xml RUN . /opt/ros/${ROS_DISTRO}/setup.sh && rosdep init && rosdep update From 06e09a594aba6730ebf1c12f6d990fbd9fd7ab04 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 9 Mar 2026 14:32:43 +0000 Subject: [PATCH 09/24] fix: dont clean first! --- base.dockerfile | 11 +++++------ cuda.dockerfile | 8 +++++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/base.dockerfile b/base.dockerfile index f9127e3..c70205a 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -10,10 +10,8 @@ ENV ROS_DISTRO=${ROS_DISTRO} ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get clean && rm -rf /var/cache/apt/archives/* &&\ - apt-get update && apt-get upgrade -y - -RUN apt-get install -y \ +RUN apt-get update && apt-get upgrade -y && \ + apt-get install -y \ build-essential \ ca-certificates \ cmake \ @@ -23,8 +21,9 @@ RUN apt-get install -y \ unzip \ ros-${ROS_DISTRO}-ros-base \ ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ - python3-colcon-common-extensions \ - && rm -rf /var/lib/apt/lists/* + python3-colcon-common-extensions && \ + rm -rf /var/lib/apt/lists/* && \ + apt-get clean && rm -rf /var/cache/apt/archives/* RUN . /opt/ros/${ROS_DISTRO}/setup.sh && rosdep update diff --git a/cuda.dockerfile b/cuda.dockerfile index fab521e..ff28e4e 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -12,8 +12,7 @@ ENV ROS_DISTRO=${ROS_DISTRO} ENV DEBIAN_FRONTEND=noninteractive # Install language -RUN apt-get clean && rm -rf /var/cache/apt/archives/* && \ - apt-get update ; \ +RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ locales \ @@ -29,7 +28,10 @@ RUN apt-get clean && rm -rf /var/cache/apt/archives/* && \ tzdata \ && locale-gen en_US.UTF-8 \ && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean \ + && rm -rf /var/cache/apt/archives/* + ENV LANG=en_US.UTF-8 RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg From 7985f607645490fb6907a89a8ddb616755c01689 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 9 Mar 2026 14:45:21 +0000 Subject: [PATCH 10/24] ci: disable cache and dont apt clean --- .github/workflows/_build-image.yaml | 2 +- base.dockerfile | 3 +-- cuda.dockerfile | 6 ++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/_build-image.yaml b/.github/workflows/_build-image.yaml index 23832aa..8511ac4 100644 --- a/.github/workflows/_build-image.yaml +++ b/.github/workflows/_build-image.yaml @@ -73,7 +73,7 @@ jobs: file: ./${{ inputs.dockerfile }} platforms: ${{ inputs.architectures }} push: true - cache-from: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ inputs.push_image }}:${{ inputs.ros_distro }} + # cache-from: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ inputs.push_image }}:${{ inputs.ros_distro }} cache-to: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ inputs.push_image }}:${{ inputs.ros_distro }},mode=max tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/base.dockerfile b/base.dockerfile index c70205a..4ff3299 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -22,8 +22,7 @@ RUN apt-get update && apt-get upgrade -y && \ ros-${ROS_DISTRO}-ros-base \ ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ python3-colcon-common-extensions && \ - rm -rf /var/lib/apt/lists/* && \ - apt-get clean && rm -rf /var/cache/apt/archives/* + rm -rf /var/lib/apt/lists/* RUN . /opt/ros/${ROS_DISTRO}/setup.sh && rosdep update diff --git a/cuda.dockerfile b/cuda.dockerfile index ff28e4e..a102a69 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -28,10 +28,8 @@ RUN apt-get update && \ tzdata \ && locale-gen en_US.UTF-8 \ && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \ - && rm -rf /var/lib/apt/lists/* \ - && apt-get clean \ - && rm -rf /var/cache/apt/archives/* - + && rm -rf /var/lib/apt/lists/* + ENV LANG=en_US.UTF-8 RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg From 178364b6013cb1d3a2cb2dceb3e464dbdebd4d9c Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 9 Mar 2026 14:53:43 +0000 Subject: [PATCH 11/24] fix: update package installation to include locale settings --- base.dockerfile | 13 ++++++++++--- cuda.dockerfile | 15 +++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/base.dockerfile b/base.dockerfile index 4ff3299..dbf45a1 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -10,8 +10,11 @@ ENV ROS_DISTRO=${ROS_DISTRO} ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get upgrade -y && \ - apt-get install -y \ +RUN apt-get update || true \ + && apt-get install -y --no-install-recommends gnupg ca-certificates \ + && apt-get update \ + && apt-get upgrade -y \ + apt-get install -y --no-install-recommends \ build-essential \ ca-certificates \ cmake \ @@ -22,7 +25,11 @@ RUN apt-get update && apt-get upgrade -y && \ ros-${ROS_DISTRO}-ros-base \ ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ python3-colcon-common-extensions && \ - rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* \ + && locale-gen en_GB.UTF-8 \ + && update-locale LC_ALL=en_GB.UTF-8 LANG=en_GB.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + RUN . /opt/ros/${ROS_DISTRO}/setup.sh && rosdep update diff --git a/cuda.dockerfile b/cuda.dockerfile index a102a69..340ab5e 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -11,9 +11,10 @@ ENV ROS_DISTRO=${ROS_DISTRO} ENV DEBIAN_FRONTEND=noninteractive -# Install language -RUN apt-get update && \ - apt-get upgrade -y && \ +RUN apt-get update || true \ + && apt-get install -y --no-install-recommends gnupg ca-certificates \ + && apt-get update \ + && apt-get upgrade -y \ apt-get install -y --no-install-recommends \ locales \ curl \ @@ -26,13 +27,11 @@ RUN apt-get update && \ python3-setuptools \ software-properties-common \ tzdata \ - && locale-gen en_US.UTF-8 \ - && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \ + && locale-gen en_GB.UTF-8 \ + && update-locale LC_ALL=en_GB.UTF-8 LANG=en_GB.UTF-8 \ && rm -rf /var/lib/apt/lists/* -ENV LANG=en_US.UTF-8 - -RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg +ENV LANG=en_GB.UTF-8 # Prepare ROS2 RUN add-apt-repository universe \ From 4d94d356a857fd508c999486e956b7a0a0a26d7f Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 9 Mar 2026 15:15:04 +0000 Subject: [PATCH 12/24] ci: fix this time i hope --- base.dockerfile | 8 ++++---- cuda.dockerfile | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/base.dockerfile b/base.dockerfile index dbf45a1..a307b4a 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -13,8 +13,9 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update || true \ && apt-get install -y --no-install-recommends gnupg ca-certificates \ && apt-get update \ - && apt-get upgrade -y \ - apt-get install -y --no-install-recommends \ + && apt-get upgrade -y + +RUN apt-get install -y --no-install-recommends \ build-essential \ ca-certificates \ cmake \ @@ -26,10 +27,9 @@ RUN apt-get update || true \ ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ python3-colcon-common-extensions && \ rm -rf /var/lib/apt/lists/* \ - && locale-gen en_GB.UTF-8 \ - && update-locale LC_ALL=en_GB.UTF-8 LANG=en_GB.UTF-8 \ && rm -rf /var/lib/apt/lists/* +ENV LANG=en_GB.UTF-8 RUN . /opt/ros/${ROS_DISTRO}/setup.sh && rosdep update diff --git a/cuda.dockerfile b/cuda.dockerfile index 340ab5e..c71b525 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -14,8 +14,9 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update || true \ && apt-get install -y --no-install-recommends gnupg ca-certificates \ && apt-get update \ - && apt-get upgrade -y \ - apt-get install -y --no-install-recommends \ + && apt-get upgrade -y + +RUN apt-get install -y --no-install-recommends \ locales \ curl \ wget \ From 53690bb9597ade3a866201878b19747660ad961c Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 9 Mar 2026 15:55:06 +0000 Subject: [PATCH 13/24] ci: come on, disable cache --- .github/workflows/_build-image.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_build-image.yaml b/.github/workflows/_build-image.yaml index 8511ac4..7471c18 100644 --- a/.github/workflows/_build-image.yaml +++ b/.github/workflows/_build-image.yaml @@ -73,8 +73,9 @@ jobs: file: ./${{ inputs.dockerfile }} platforms: ${{ inputs.architectures }} push: true + no-cache: true # cache-from: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ inputs.push_image }}:${{ inputs.ros_distro }} - cache-to: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ inputs.push_image }}:${{ inputs.ros_distro }},mode=max + # cache-to: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ inputs.push_image }}:${{ inputs.ros_distro }},mode=max tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | From c47814cbdbd761424cc72cdf4ceb4170148f8c30 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 9 Mar 2026 16:45:44 +0000 Subject: [PATCH 14/24] fix: update locale settings to use en_US.UTF-8 --- .github/workflows/docker-build-and-push.yaml | 2 +- base.dockerfile | 2 +- cuda.dockerfile | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index f2c6942..c8f090b 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -37,7 +37,7 @@ jobs: with: base_image: nvidia/cuda:11.8.0-runtime-ubuntu22.04 push_image: ros_cuda - ros_distro: humble + ros_distro: humble dockerfile: cuda.dockerfile architectures: linux/amd64 secrets: inherit diff --git a/base.dockerfile b/base.dockerfile index a307b4a..81dec92 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -29,7 +29,7 @@ RUN apt-get install -y --no-install-recommends \ rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* -ENV LANG=en_GB.UTF-8 +ENV LANG=en_US.UTF-8 RUN . /opt/ros/${ROS_DISTRO}/setup.sh && rosdep update diff --git a/cuda.dockerfile b/cuda.dockerfile index c71b525..487dade 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -28,11 +28,11 @@ RUN apt-get install -y --no-install-recommends \ python3-setuptools \ software-properties-common \ tzdata \ - && locale-gen en_GB.UTF-8 \ - && update-locale LC_ALL=en_GB.UTF-8 LANG=en_GB.UTF-8 \ + && locale-gen en_US.UTF-8 \ + && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \ && rm -rf /var/lib/apt/lists/* -ENV LANG=en_GB.UTF-8 +ENV LANG=en_US.UTF-8 # Prepare ROS2 RUN add-apt-repository universe \ From 1b7b052084ee828afb5c5e1d8d771145097466b4 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Tue, 10 Mar 2026 12:01:53 +0000 Subject: [PATCH 15/24] ci: add docker pull step --- .github/workflows/_build-image.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_build-image.yaml b/.github/workflows/_build-image.yaml index 7471c18..f14258c 100644 --- a/.github/workflows/_build-image.yaml +++ b/.github/workflows/_build-image.yaml @@ -46,6 +46,9 @@ jobs: username: ${{ secrets.LCAS_REGISTRY_PUSHER }} password: ${{ secrets.LCAS_REGISTRY_TOKEN }} + - name: Pull base image + run: docker pull ${{ inputs.base_image }} + - name: Docker meta id: meta uses: docker/metadata-action@v5 @@ -73,11 +76,11 @@ jobs: file: ./${{ inputs.dockerfile }} platforms: ${{ inputs.architectures }} push: true - no-cache: true + no-cache: true # cache-from: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ inputs.push_image }}:${{ inputs.ros_distro }} # cache-to: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ inputs.push_image }}:${{ inputs.ros_distro }},mode=max tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | BASE_IMAGE=${{ inputs.base_image }} - ROS_DISTRO=${{ inputs.ros_distro }} \ No newline at end of file + ROS_DISTRO=${{ inputs.ros_distro }} From e86b3a716aa440eba7693b0ad537166c4ccb3186 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Tue, 10 Mar 2026 12:25:43 +0000 Subject: [PATCH 16/24] ci: change tags to a newer cuda tag --- .github/workflows/docker-build-and-push.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index c8f090b..baaecf0 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -35,7 +35,7 @@ jobs: ros-cuda-humble: uses: ./.github/workflows/_build-image.yaml with: - base_image: nvidia/cuda:11.8.0-runtime-ubuntu22.04 + base_image: nvidia/cuda:11.8.0-devel-ubuntu22.04 push_image: ros_cuda ros_distro: humble dockerfile: cuda.dockerfile @@ -45,7 +45,7 @@ jobs: ros-cuda-jazzy: uses: ./.github/workflows/_build-image.yaml with: - base_image: nvidia/cuda:12.6.3-cudnn-devel-ubuntu24.04 + base_image: nvidia/cuda:12.9.1-devel-ubuntu24.04 push_image: ros_cuda ros_distro: jazzy dockerfile: cuda.dockerfile From a814a5e8614fbd1702fb55109ddc5099d6873d36 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Tue, 10 Mar 2026 18:49:49 +0000 Subject: [PATCH 17/24] ci: debugging --- .github/workflows/_build-image.yaml | 3 +++ cuda.dockerfile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_build-image.yaml b/.github/workflows/_build-image.yaml index f14258c..2840cf8 100644 --- a/.github/workflows/_build-image.yaml +++ b/.github/workflows/_build-image.yaml @@ -49,6 +49,9 @@ jobs: - name: Pull base image run: docker pull ${{ inputs.base_image }} + - name: Debug - Echo Date + run: date + - name: Docker meta id: meta uses: docker/metadata-action@v5 diff --git a/cuda.dockerfile b/cuda.dockerfile index 487dade..662a468 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE=nvidia/cuda:11.8.0-runtime-ubuntu22.04 +ARG BASE_IMAGE=nvidia/cuda:11.8.0-devel-ubuntu22.04 ARG ROS_DISTRO=humble ########################################### From 0b2f00ac4f613e2b8a6e90c5d95eb7b8c59785ed Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Wed, 11 Mar 2026 18:20:44 +0000 Subject: [PATCH 18/24] ci: clean up and try again --- base.dockerfile | 10 ++++------ cuda.dockerfile | 10 +++------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/base.dockerfile b/base.dockerfile index 81dec92..acde641 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -10,14 +10,12 @@ ENV ROS_DISTRO=${ROS_DISTRO} ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update || true \ - && apt-get install -y --no-install-recommends gnupg ca-certificates \ - && apt-get update \ - && apt-get upgrade -y - -RUN apt-get install -y --no-install-recommends \ +RUN apt-get update \ + && apt-get upgrade -y && \ + apt-get install -y --no-install-recommends \ build-essential \ ca-certificates \ + gnupg \ cmake \ git \ curl \ diff --git a/cuda.dockerfile b/cuda.dockerfile index 662a468..cb05f5a 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -11,12 +11,9 @@ ENV ROS_DISTRO=${ROS_DISTRO} ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update || true \ - && apt-get install -y --no-install-recommends gnupg ca-certificates \ - && apt-get update \ - && apt-get upgrade -y - -RUN apt-get install -y --no-install-recommends \ +RUN apt-get update \ + && apt-get upgrade -y \ + && apt-get install -y --no-install-recommends \ locales \ curl \ wget \ @@ -92,4 +89,3 @@ ENV SHELL=/bin/bash USER ${USERNAME} CMD ["bash", "-l"] - From e3e0429f628da8f53dc1ee0b6e241f642b9e36e4 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Fri, 13 Mar 2026 09:47:20 +0000 Subject: [PATCH 19/24] fix: run as sudo for updates in desktop As we are running at the previous container out as the standard user and not root --- .github/workflows/_build-image.yaml | 5 ++--- cuda_desktop.dockerfile | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/_build-image.yaml b/.github/workflows/_build-image.yaml index 2840cf8..e9f46b7 100644 --- a/.github/workflows/_build-image.yaml +++ b/.github/workflows/_build-image.yaml @@ -79,9 +79,8 @@ jobs: file: ./${{ inputs.dockerfile }} platforms: ${{ inputs.architectures }} push: true - no-cache: true - # cache-from: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ inputs.push_image }}:${{ inputs.ros_distro }} - # cache-to: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ inputs.push_image }}:${{ inputs.ros_distro }},mode=max + cache-from: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ inputs.push_image }}:${{ inputs.ros_distro }} + cache-to: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ inputs.push_image }}:${{ inputs.ros_distro }},mode=max tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | diff --git a/cuda_desktop.dockerfile b/cuda_desktop.dockerfile index 9e36983..27bbccd 100644 --- a/cuda_desktop.dockerfile +++ b/cuda_desktop.dockerfile @@ -3,6 +3,6 @@ ARG BASE_IMAGE ########################################### FROM ${BASE_IMAGE} AS base -RUN apt-get update && apt-get install -y --no-install-recommends \ +RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ ros-${ROS_DISTRO}-desktop \ && rm -rf /var/lib/apt/lists/* From de5636ec14e259ccb3f31ee5996ac1b1ea1b2ed1 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Fri, 13 Mar 2026 10:39:28 +0000 Subject: [PATCH 20/24] fix: rm as sudo --- cuda_desktop.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuda_desktop.dockerfile b/cuda_desktop.dockerfile index 27bbccd..7c93fb1 100644 --- a/cuda_desktop.dockerfile +++ b/cuda_desktop.dockerfile @@ -5,4 +5,4 @@ FROM ${BASE_IMAGE} AS base RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ ros-${ROS_DISTRO}-desktop \ - && rm -rf /var/lib/apt/lists/* + && sudo rm -rf /var/lib/apt/lists/* From 001de9c9591b3a1abe93b5ef8ab4b87b80a5fd2a Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Fri, 13 Mar 2026 11:05:59 +0000 Subject: [PATCH 21/24] ci: undo changes from when the runners broke --- .github/workflows/_build-image.yaml | 3 --- .github/workflows/docker-build-and-push.yaml | 4 ++-- cuda.dockerfile | 2 +- cuda_desktop.dockerfile | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/_build-image.yaml b/.github/workflows/_build-image.yaml index e9f46b7..80c2ebd 100644 --- a/.github/workflows/_build-image.yaml +++ b/.github/workflows/_build-image.yaml @@ -49,9 +49,6 @@ jobs: - name: Pull base image run: docker pull ${{ inputs.base_image }} - - name: Debug - Echo Date - run: date - - name: Docker meta id: meta uses: docker/metadata-action@v5 diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index baaecf0..407675f 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -35,7 +35,7 @@ jobs: ros-cuda-humble: uses: ./.github/workflows/_build-image.yaml with: - base_image: nvidia/cuda:11.8.0-devel-ubuntu22.04 + base_image: nvidia/cuda:11.8.0-runtime-ubuntu22.04 push_image: ros_cuda ros_distro: humble dockerfile: cuda.dockerfile @@ -45,7 +45,7 @@ jobs: ros-cuda-jazzy: uses: ./.github/workflows/_build-image.yaml with: - base_image: nvidia/cuda:12.9.1-devel-ubuntu24.04 + base_image: nvidia/cuda:12.9.1-runtime-ubuntu24.04 push_image: ros_cuda ros_distro: jazzy dockerfile: cuda.dockerfile diff --git a/cuda.dockerfile b/cuda.dockerfile index cb05f5a..5c7480a 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE=nvidia/cuda:11.8.0-devel-ubuntu22.04 +ARG BASE_IMAGE=nvidia/cuda:11.8.0-runtime-ubuntu22.04 ARG ROS_DISTRO=humble ########################################### diff --git a/cuda_desktop.dockerfile b/cuda_desktop.dockerfile index 7c93fb1..30e7907 100644 --- a/cuda_desktop.dockerfile +++ b/cuda_desktop.dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE +ARG BASE_IMAGE=lcas.lincoln.ac.uk/ros_cuda:humble-main ########################################### FROM ${BASE_IMAGE} AS base From 30d3e7bb4c8d8ffd748e8f2ea96dbac0c3fb93ab Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Fri, 13 Mar 2026 11:31:46 +0000 Subject: [PATCH 22/24] Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- base.dockerfile | 5 ++--- cuda.dockerfile | 8 +++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/base.dockerfile b/base.dockerfile index acde641..84692fa 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -24,8 +24,7 @@ RUN apt-get update \ ros-${ROS_DISTRO}-ros-base \ ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \ python3-colcon-common-extensions && \ - rm -rf /var/lib/apt/lists/* \ - && rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* ENV LANG=en_US.UTF-8 @@ -46,7 +45,7 @@ RUN groupadd --gid $USER_GID $USERNAME \ && rm -rf /var/lib/apt/lists/* # Cyclone DDS Config -COPY cyclonedds.xml /etc/cyclonedds.xml +COPY cyclonedds.xml /etc/cyclonedds.xml # Configure bash profile RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root/.bashrc && \ diff --git a/cuda.dockerfile b/cuda.dockerfile index 5c7480a..e86ce21 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -43,7 +43,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* # Cyclone DDS Config -COPY cyclonedds.xml /etc/cyclonedds.xml +COPY cyclonedds.xml /etc/cyclonedds.xml RUN . /opt/ros/${ROS_DISTRO}/setup.sh && rosdep init && rosdep update @@ -73,9 +73,11 @@ RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /etc/bash.bashrc && \ echo "alias t='tmux'" >> /etc/bash.bashrc && \ echo "alias cls='clear'" >> /etc/bash.bashrc && \ - echo "RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> /etc/bash.bashrc && \ - echo "CYCLONEDDS_URI=file:///etc/cyclonedds.xml" >> /etc/bash.bashrc + echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> /etc/bash.bashrc && \ + echo "export CYCLONEDDS_URI=file:///etc/cyclonedds.xml" >> /etc/bash.bashrc +ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp +ENV CYCLONEDDS_URI=file:///etc/cyclonedds.xml ENV TVNC_VGL=1 ENV VGL_ISACTIVE=1 ENV VGL_FPS=25 From 730adf86f5f1cb8090b1b8562e79ab4e454d3acb Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Fri, 13 Mar 2026 12:35:25 +0000 Subject: [PATCH 23/24] fix: move the env for RMW and Cyclone into actual ENVs --- base.dockerfile | 7 ++++--- cuda.dockerfile | 6 ++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/base.dockerfile b/base.dockerfile index 84692fa..76b723e 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -53,9 +53,10 @@ RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root echo 'PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "' >> /etc/bash.bashrc && \ echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /etc/bash.bashrc && \ echo "alias t='tmux'" >> /etc/bash.bashrc && \ - echo "alias cls='clear'" >> /etc/bash.bashrc && \ - echo "RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> /etc/bash.bashrc && \ - echo "CYCLONEDDS_URI=file:///etc/cyclonedds.xml" >> /etc/bash.bashrc + echo "alias cls='clear'" >> /etc/bash.bashrc + +ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp +ENV CYCLONEDDS_URI=file:///etc/cyclonedds.xml USER ${USERNAME} CMD ["bash", "-l"] diff --git a/cuda.dockerfile b/cuda.dockerfile index e86ce21..3312b1c 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -72,10 +72,8 @@ RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root echo 'PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "' >> /etc/bash.bashrc && \ echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /etc/bash.bashrc && \ echo "alias t='tmux'" >> /etc/bash.bashrc && \ - echo "alias cls='clear'" >> /etc/bash.bashrc && \ - echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> /etc/bash.bashrc && \ - echo "export CYCLONEDDS_URI=file:///etc/cyclonedds.xml" >> /etc/bash.bashrc - + echo "alias cls='clear'" >> /etc/bash.bashrc + ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ENV CYCLONEDDS_URI=file:///etc/cyclonedds.xml ENV TVNC_VGL=1 From c761948ac16972d7ee6ad52952e5bb4db403ae39 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Fri, 13 Mar 2026 14:00:36 +0000 Subject: [PATCH 24/24] Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- base.dockerfile | 6 +++--- cuda.dockerfile | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/base.dockerfile b/base.dockerfile index 76b723e..1e9ead5 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -34,10 +34,9 @@ ARG USERNAME=ros ARG USER_UID=1001 ARG USER_GID=$USER_UID -# Create a non-root user +# Create a non-root user and add sudo support for the non-root user RUN groupadd --gid $USER_GID $USERNAME \ && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ - # Add sudo support for the non-root user && apt-get update \ && apt-get install -y --no-install-recommends sudo \ && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\ @@ -53,7 +52,8 @@ RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root echo 'PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "' >> /etc/bash.bashrc && \ echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /etc/bash.bashrc && \ echo "alias t='tmux'" >> /etc/bash.bashrc && \ - echo "alias cls='clear'" >> /etc/bash.bashrc + echo "alias cls='clear'" >> /etc/bash.bashrc && \ + chown ${USERNAME}:${USER_GID} /home/${USERNAME}/.bashrc ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ENV CYCLONEDDS_URI=file:///etc/cyclonedds.xml diff --git a/cuda.dockerfile b/cuda.dockerfile index 3312b1c..0a4e2ec 100644 --- a/cuda.dockerfile +++ b/cuda.dockerfile @@ -69,6 +69,7 @@ RUN groupadd --gid $USER_GID $USERNAME \ # Configure bash profile RUN echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /root/.bashrc && \ echo "if [ -f /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi" >> /home/${USERNAME}/.bashrc && \ + chown ${USERNAME}:${USERNAME} /home/${USERNAME}/.bashrc && \ echo 'PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "' >> /etc/bash.bashrc && \ echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /etc/bash.bashrc && \ echo "alias t='tmux'" >> /etc/bash.bashrc && \