From eb18e25d8b7d6bb8aea30d60400c285cd64d69e4 Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Fri, 17 Jul 2026 13:03:26 +0100 Subject: [PATCH 1/7] Modify Docker build workflow base images Updated the Docker build workflow to include a new base image and removed commented-out lines for clarity. --- .github/workflows/docker-build.yaml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 6d65f36..3851d66 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -21,15 +21,18 @@ jobs: fail-fast: false matrix: include: - - base_image: westonrobot/ros:humble-ci - push_tag: westonrobot - - - base_image: nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 - push_tag: jammy-cuda11.8 - - - base_image: nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04 - push_tag: jammy-cuda12.1 +# - base_image: westonrobot/ros:humble-ci +# push_tag: westonrobot + - base_image: westonrobot/ros:jazzy-latest + push_tag: westonrobot-jazzy + +# - base_image: nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 +# push_tag: jammy-cuda11.8 +# +# - base_image: nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04 +# push_tag: jammy-cuda12.1 +# - base_image: nvidia/cuda:12.2.2-cudnn8-devel-ubuntu22.04 push_tag: jammy-cuda12.2 From 7c5e27200ceb6b210808b85425c2ca869d9e909a Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Fri, 17 Jul 2026 13:32:45 +0100 Subject: [PATCH 2/7] Update Dockerfile to install additional packages --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 4b71aff..451d922 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ + ca-certificates curl gnupg lsb-release \ locales \ && locale-gen en_US.UTF-8 \ && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \ From 1af526c8422a0a383d129baa7cc44b7e611dd421 Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Fri, 17 Jul 2026 14:29:21 +0100 Subject: [PATCH 3/7] Refactor Dockerfile for Ubuntu source compatibility Updated the Dockerfile to ensure compatibility with Ubuntu sources and changed the method of adding the LCAS repository. --- Dockerfile | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9c9b9ba..f1859bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,25 @@ ARG BASE_IMAGE=nvidia/cuda:11.8.0-runtime-ubuntu22.04 ########################################### FROM ${BASE_IMAGE} AS base + +# Ensure apt source layout is compatible (Ubuntu 22.04/24.04, classic + deb822) +RUN set -eux; \ + . /etc/os-release; \ + # If new-style ubuntu.sources exists, ensure it points to valid URIs + if [ -f /etc/apt/sources.list.d/ubuntu.sources ]; then \ + sed -i 's|http://archive.ubuntu.com/ubuntu|http://ports.ubuntu.com/ubuntu-ports|g' /etc/apt/sources.list.d/ubuntu.sources || true; \ + sed -i 's|http://security.ubuntu.com/ubuntu|http://ports.ubuntu.com/ubuntu-ports|g' /etc/apt/sources.list.d/ubuntu.sources || true; \ + fi; \ + # If classic sources.list is missing/empty, create a safe default + if [ ! -s /etc/apt/sources.list ]; then \ + printf "deb http://archive.ubuntu.com/ubuntu %s main universe multiverse restricted\n" "$VERSION_CODENAME" > /etc/apt/sources.list; \ + printf "deb http://archive.ubuntu.com/ubuntu %s-updates main universe multiverse restricted\n" "$VERSION_CODENAME" >> /etc/apt/sources.list; \ + printf "deb http://security.ubuntu.com/ubuntu %s-security main universe multiverse restricted\n" "$VERSION_CODENAME" >> /etc/apt/sources.list; \ + fi; \ + apt-get clean; \ + rm -rf /var/lib/apt/lists/*; \ + apt-get update + ENV DEBIAN_FRONTEND=noninteractive # Install language @@ -93,9 +112,13 @@ RUN apt-get update && \ apt-get install -y lsb-release curl software-properties-common unzip apt-transport-https && \ rm -rf /var/lib/apt/lists/* -RUN sh -c 'echo "deb https://lcas.lincoln.ac.uk/apt/lcas $(lsb_release -sc) lcas" > /etc/apt/sources.list.d/lcas-latest.list' && \ - curl -s https://lcas.lincoln.ac.uk/apt/repo_signing.gpg > /etc/apt/trusted.gpg.d/lcas-latest.gpg - +RUN set -eux; \ + codename="$(lsb_release -sc)"; \ + curl -fsSL https://lcas.lincoln.ac.uk/apt/repo_signing.gpg \ + -o /usr/share/keyrings/lcas-archive-keyring.gpg; \ + echo "deb [signed-by=/usr/share/keyrings/lcas-archive-keyring.gpg] https://lcas.lincoln.ac.uk/apt/lcas ${codename} lcas" \ + > /etc/apt/sources.list.d/lcas-latest.list + RUN mkdir -p /etc/ros/rosdep/sources.list.d/ && \ curl -o /etc/ros/rosdep/sources.list.d/20-default.list https://raw.githubusercontent.com/LCAS/rosdistro/master/rosdep/sources.list.d/20-default.list && \ curl -o /etc/ros/rosdep/sources.list.d/50-lcas.list https://raw.githubusercontent.com/LCAS/rosdistro/master/rosdep/sources.list.d/50-lcas.list From 403366f1c1ea69690e42c5d933c312658fa9fcbf Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Fri, 17 Jul 2026 14:31:42 +0100 Subject: [PATCH 4/7] Refactor apt source configuration in Dockerfile Updated the Dockerfile to configure apt sources for different architectures and ensure proper source lists are created. --- Dockerfile | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index f1859bb..0b79726 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,20 +4,23 @@ ARG BASE_IMAGE=nvidia/cuda:11.8.0-runtime-ubuntu22.04 FROM ${BASE_IMAGE} AS base -# Ensure apt source layout is compatible (Ubuntu 22.04/24.04, classic + deb822) RUN set -eux; \ . /etc/os-release; \ - # If new-style ubuntu.sources exists, ensure it points to valid URIs - if [ -f /etc/apt/sources.list.d/ubuntu.sources ]; then \ - sed -i 's|http://archive.ubuntu.com/ubuntu|http://ports.ubuntu.com/ubuntu-ports|g' /etc/apt/sources.list.d/ubuntu.sources || true; \ - sed -i 's|http://security.ubuntu.com/ubuntu|http://ports.ubuntu.com/ubuntu-ports|g' /etc/apt/sources.list.d/ubuntu.sources || true; \ - fi; \ - # If classic sources.list is missing/empty, create a safe default - if [ ! -s /etc/apt/sources.list ]; then \ - printf "deb http://archive.ubuntu.com/ubuntu %s main universe multiverse restricted\n" "$VERSION_CODENAME" > /etc/apt/sources.list; \ - printf "deb http://archive.ubuntu.com/ubuntu %s-updates main universe multiverse restricted\n" "$VERSION_CODENAME" >> /etc/apt/sources.list; \ - printf "deb http://security.ubuntu.com/ubuntu %s-security main universe multiverse restricted\n" "$VERSION_CODENAME" >> /etc/apt/sources.list; \ + codename="${VERSION_CODENAME:-$(lsb_release -sc)}"; \ + arch="$(dpkg --print-architecture)"; \ + # remove any inherited/broken sources definitions + rm -f /etc/apt/sources.list; \ + rm -f /etc/apt/sources.list.d/*.list; \ + rm -f /etc/apt/sources.list.d/*.sources; \ + # recreate canonical Ubuntu sources + if [ "$arch" = "arm64" ] || [ "$arch" = "armhf" ] || [ "$arch" = "ppc64el" ] || [ "$arch" = "s390x" ]; then \ + mirror="http://ports.ubuntu.com/ubuntu-ports"; \ + else \ + mirror="http://archive.ubuntu.com/ubuntu"; \ fi; \ + printf "deb %s %s main restricted universe multiverse\n" "$mirror" "$codename" > /etc/apt/sources.list; \ + printf "deb %s %s-updates main restricted universe multiverse\n" "$mirror" "$codename" >> /etc/apt/sources.list; \ + printf "deb http://security.ubuntu.com/ubuntu %s-security main restricted universe multiverse\n" "$codename" >> /etc/apt/sources.list; \ apt-get clean; \ rm -rf /var/lib/apt/lists/*; \ apt-get update From 9d43aab57bfec110daf6f48706b81959a2c37729 Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Fri, 17 Jul 2026 14:35:59 +0100 Subject: [PATCH 5/7] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0b79726..78b971a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN set -eux; \ fi; \ printf "deb %s %s main restricted universe multiverse\n" "$mirror" "$codename" > /etc/apt/sources.list; \ printf "deb %s %s-updates main restricted universe multiverse\n" "$mirror" "$codename" >> /etc/apt/sources.list; \ - printf "deb http://security.ubuntu.com/ubuntu %s-security main restricted universe multiverse\n" "$codename" >> /etc/apt/sources.list; \ + printf "deb %s %s-security main restricted universe multiverse\n" "$mirror" "$codename" >> /etc/apt/sources.list; \ apt-get clean; \ rm -rf /var/lib/apt/lists/*; \ apt-get update From cb28b6ac77e4767a3e8806c68300706f90a1edf8 Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Fri, 17 Jul 2026 15:12:10 +0100 Subject: [PATCH 6/7] Fix curl robustness in Dockerfile for L-CAS repository --- Dockerfile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 78b971a..a976818 100644 --- a/Dockerfile +++ b/Dockerfile @@ -117,8 +117,12 @@ RUN apt-get update && \ RUN set -eux; \ codename="$(lsb_release -sc)"; \ + curl -fsSL https://lcas.lincoln.ac.uk/apt/repo_signing.gpg \ - -o /usr/share/keyrings/lcas-archive-keyring.gpg; \ + --fail --show-error --silent --location \ + --retry 8 --retry-delay 5 --retry-connrefused \ + --connect-timeout 10 --max-time 180 \ + -o /usr/share/keyrings/lcas-archive-keyring.gpg; \ echo "deb [signed-by=/usr/share/keyrings/lcas-archive-keyring.gpg] https://lcas.lincoln.ac.uk/apt/lcas ${codename} lcas" \ > /etc/apt/sources.list.d/lcas-latest.list @@ -242,12 +246,12 @@ RUN echo "# Welcome to the L-CAS Desktop Container.\n" > /opt/image/info.md; \ echo "This is a Virtual Desktop provided by [L-CAS](https://lcas.lincoln.ac.uk/)." >> /opt/image/info.md; \ echo "You can access it via a web browser at port 5801, e.g. http://localhost:5801 (or wherever you have exposed its internal port)." >> /opt/image/info.md; \ echo "\n" >> /opt/image/info.md; \ - echo "*built from https://github.com/LCAS/ros-docker-images\n(commit: [\`$(cat /opt/image/version)\`](https://github.com/LCAS/ros-docker-images/tree/$(cat /opt/image/version)/)),\nprovided to you by [L-CAS](https://lcas.lincoln.ac.uk/).*" >> /opt/image/info.md; \ + echo "*built from https://github.com//ros-docker-images\n(commit: [\`$(cat /opt/image/version)\`](https://github.com//ros-docker-images/tree/$(cat /opt/image/version)/)),\nprovided to you by [L-CAS](https://.lincoln.ac.uk/).*" >> /opt/image/info.md; \ echo "\n" >> /opt/image/info.md; \ echo "## Installed Software\n" >> /opt/image/info.md; \ echo "The following software is installed:" >> /opt/image/info.md; \ - echo "* The L-CAS ROS2 [apt repositories](https://lcas.lincoln.ac.uk/apt/lcas) are enabled." >> /opt/image/info.md; \ - echo "* The L-CAS [rosdistro](https://github.com/LCAS/rosdistro) is enabled." >> /opt/image/info.md; \ + echo "* The L-CAS ROS2 [apt repositories](https://.lincoln.ac.uk/apt/) are enabled." >> /opt/image/info.md; \ + echo "* The L-CAS [rosdistro](https://github.com//rosdistro) is enabled." >> /opt/image/info.md; \ echo "* The Zenoh ROS2 bridge \`zenoh-bridge-ros2dds\` (version: ${ZENOH_BRIDGE_VERSION})." >> /opt/image/info.md; \ echo "* Node.js (with npm) in version $(node --version)." >> /opt/image/info.md; \ echo "* password-less \`sudo\` to install more packages." >> /opt/image/info.md; \ @@ -266,7 +270,7 @@ RUN mkdir -p ${HOME}/Desktop/ && \ ln -s /opt/image/info.md ${HOME}/Desktop/info.md && \ ln -s /opt/image/README.md ${HOME}/Desktop/README.md -RUN mkdir -p ~/.config/rosdistro && echo "index_url: https://raw.github.com/LCAS/rosdistro/master/index-v4.yaml" > ~/.config/rosdistro/config.yaml +RUN mkdir -p ~/.config/rosdistro && echo "index_url: https://raw.github.com//rosdistro/master/index-v4.yaml" > ~/.config/rosdistro/config.yaml ENV DISPLAY=:1 ENV TVNC_VGL=1 From d5c799c66e1615f5178b5985b9706f634e9c2bef Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Fri, 17 Jul 2026 15:12:45 +0100 Subject: [PATCH 7/7] Remove caching options from Docker build workflow Removed cache-from and cache-to options from Docker build. --- .github/workflows/docker-build.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 3851d66..3090f1b 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -92,8 +92,6 @@ jobs: file: ./Dockerfile platforms: linux/amd64,linux/arm64 push: true - cache-from: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ steps.docker_image_name.outputs.docker_image }}:${{ matrix.push_tag }} - cache-to: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ steps.docker_image_name.outputs.docker_image }}:${{ matrix.push_tag }},mode=max tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: |