From 181e41223d4dad4112d803ea0f1568947fad06ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 21 Mar 2025 12:09:28 -0700 Subject: [PATCH 01/13] Fetch pixi.toml directly from a git repository clone. Using an in-container command to fetch this file prevents docker from invalidating cached copies of the fetch when the remote content changes. Cloning the git repository may result in overly aggressive cache busting, but using ADD with the githubusercontent url directly will also have problems during iteration as that url is also cached for a period of time and does not update immediately when repository contents change. --- windows_docker_resources/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index cf48f6db..6da283f0 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -37,7 +37,8 @@ RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex (( # Install dependencies via pixi ARG ROS_DISTRO=rolling WORKDIR C:\pixi_ws -RUN powershell -noexit irm https://raw.githubusercontent.com/ros2/ros2/refs/heads/%ROS_DISTRO%/pixi.toml -OutFile pixi.toml +ADD https://github.com/ros2/ros2#$ROS_DISTRO /tmp/ros2 +RUN cp /tmp/ros2/pixi.toml pixi.toml RUN pixi --color never --no-progress -q install RUN pixi --color never --no-progress -q list From 4a89d025a39a7357e53f11051b1b5f8558872ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 21 Mar 2025 12:19:07 -0700 Subject: [PATCH 02/13] What OS are we on? --- windows_docker_resources/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index 6da283f0..2ac511aa 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -38,7 +38,7 @@ RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex (( ARG ROS_DISTRO=rolling WORKDIR C:\pixi_ws ADD https://github.com/ros2/ros2#$ROS_DISTRO /tmp/ros2 -RUN cp /tmp/ros2/pixi.toml pixi.toml +RUN copy /b /tmp/ros2/pixi.toml pixi.toml RUN pixi --color never --no-progress -q install RUN pixi --color never --no-progress -q list From ef6e301fd470c6c2b3a17c1ef26e782ff59688a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 21 Mar 2025 12:22:00 -0700 Subject: [PATCH 03/13] Don't use /b as it makes it mad. --- windows_docker_resources/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index 2ac511aa..32330d3e 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -38,7 +38,7 @@ RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex (( ARG ROS_DISTRO=rolling WORKDIR C:\pixi_ws ADD https://github.com/ros2/ros2#$ROS_DISTRO /tmp/ros2 -RUN copy /b /tmp/ros2/pixi.toml pixi.toml +RUN copy /tmp/ros2/pixi.toml pixi.toml RUN pixi --color never --no-progress -q install RUN pixi --color never --no-progress -q list From 24c567eae6a43af693ccfdbf09d528dbcec20b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 21 Mar 2025 12:24:34 -0700 Subject: [PATCH 04/13] Why can't Windows just be normal* *POSIX --- windows_docker_resources/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index 32330d3e..3a261b3b 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -37,8 +37,8 @@ RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex (( # Install dependencies via pixi ARG ROS_DISTRO=rolling WORKDIR C:\pixi_ws -ADD https://github.com/ros2/ros2#$ROS_DISTRO /tmp/ros2 -RUN copy /tmp/ros2/pixi.toml pixi.toml +ADD https://github.com/ros2/ros2#$ROS_DISTRO C:\temp\ros2 +RUN copy C:\temp\ros2\pixi.toml pixi.toml RUN pixi --color never --no-progress -q install RUN pixi --color never --no-progress -q list From 2843b309dbc317eba04a2748105236e322d0ae2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 21 Mar 2025 17:16:20 -0700 Subject: [PATCH 05/13] Add curly braces in the suspicion that they affect variable expansion. --- windows_docker_resources/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index 3a261b3b..2fa2c8b5 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -37,7 +37,7 @@ RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex (( # Install dependencies via pixi ARG ROS_DISTRO=rolling WORKDIR C:\pixi_ws -ADD https://github.com/ros2/ros2#$ROS_DISTRO C:\temp\ros2 +ADD https://github.com/ros2/ros2#${ROS_DISTRO} C:\temp\ros2 RUN copy C:\temp\ros2\pixi.toml pixi.toml RUN pixi --color never --no-progress -q install RUN pixi --color never --no-progress -q list From f85ff709e39004ac4d32b849e78475a1ece6a578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 21 Mar 2025 17:22:54 -0700 Subject: [PATCH 06/13] .git suffix is required to trigger git repository behavior. --- windows_docker_resources/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index 2fa2c8b5..0405ec59 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -37,8 +37,8 @@ RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex (( # Install dependencies via pixi ARG ROS_DISTRO=rolling WORKDIR C:\pixi_ws -ADD https://github.com/ros2/ros2#${ROS_DISTRO} C:\temp\ros2 -RUN copy C:\temp\ros2\pixi.toml pixi.toml +ADD https://github.com/ros2/ros2.git#${ROS_DISTRO} C:\TEMP\ros2 +RUN copy C:\TEMP\ros2\pixi.toml pixi.toml RUN pixi --color never --no-progress -q install RUN pixi --color never --no-progress -q list From 17c13e6a73bd131f6bfc38b2924b4378d4bb2368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 21 Mar 2025 17:27:02 -0700 Subject: [PATCH 07/13] findoutwtf --- windows_docker_resources/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index 0405ec59..c658065b 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -38,6 +38,7 @@ RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex (( ARG ROS_DISTRO=rolling WORKDIR C:\pixi_ws ADD https://github.com/ros2/ros2.git#${ROS_DISTRO} C:\TEMP\ros2 +RUN powershell "(Get-Content C:\TEMP\ros2)" RUN copy C:\TEMP\ros2\pixi.toml pixi.toml RUN pixi --color never --no-progress -q install RUN pixi --color never --no-progress -q list From 19b1e982256408179b004a4b9636e9bddb65e456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 21 Mar 2025 17:28:17 -0700 Subject: [PATCH 08/13] Could it be the variable expansion? --- windows_docker_resources/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index c658065b..a882980f 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -37,7 +37,7 @@ RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex (( # Install dependencies via pixi ARG ROS_DISTRO=rolling WORKDIR C:\pixi_ws -ADD https://github.com/ros2/ros2.git#${ROS_DISTRO} C:\TEMP\ros2 +ADD https://github.com/ros2/ros2.git#rolling C:\TEMP\ros2 RUN powershell "(Get-Content C:\TEMP\ros2)" RUN copy C:\TEMP\ros2\pixi.toml pixi.toml RUN pixi --color never --no-progress -q install From d574ef7bdcd7a7715398743a2bdaed4d8cc8e29f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 21 Mar 2025 17:30:25 -0700 Subject: [PATCH 09/13] Fall back to githubusercontent for sanity's sake. This is still not great for iterating but let's try it to see what else I'm missing. --- windows_docker_resources/Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index a882980f..4f9c163d 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -37,9 +37,7 @@ RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex (( # Install dependencies via pixi ARG ROS_DISTRO=rolling WORKDIR C:\pixi_ws -ADD https://github.com/ros2/ros2.git#rolling C:\TEMP\ros2 -RUN powershell "(Get-Content C:\TEMP\ros2)" -RUN copy C:\TEMP\ros2\pixi.toml pixi.toml +ADD https://raw.githubusercontent.com/ros2/ros2/${ROS_DISTRO}/pixi.toml pixi.toml RUN pixi --color never --no-progress -q install RUN pixi --color never --no-progress -q list From d1e1e0a559e0ef88e09552472028cce0b259964e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 21 Mar 2025 17:54:05 -0700 Subject: [PATCH 10/13] Try git repos again. --- windows_docker_resources/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index 4f9c163d..18af80d9 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -37,7 +37,8 @@ RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex (( # Install dependencies via pixi ARG ROS_DISTRO=rolling WORKDIR C:\pixi_ws -ADD https://raw.githubusercontent.com/ros2/ros2/${ROS_DISTRO}/pixi.toml pixi.toml +ADD https://github.com/ros2/ros2.git#${ROS_DISTRO} /temp/ros2 +#ADD https://raw.githubusercontent.com/ros2/ros2/${ROS_DISTRO}/pixi.toml pixi.toml RUN pixi --color never --no-progress -q install RUN pixi --color never --no-progress -q list From f4e62f8f1ddd18d7b7a50613036c52709b2a0c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 21 Mar 2025 17:56:23 -0700 Subject: [PATCH 11/13] Forgot to copy the file. --- windows_docker_resources/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index 18af80d9..424be0d5 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -38,6 +38,7 @@ RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex (( ARG ROS_DISTRO=rolling WORKDIR C:\pixi_ws ADD https://github.com/ros2/ros2.git#${ROS_DISTRO} /temp/ros2 +RUN copy C:\TEMP\ros2\pixi.toml #ADD https://raw.githubusercontent.com/ros2/ros2/${ROS_DISTRO}/pixi.toml pixi.toml RUN pixi --color never --no-progress -q install RUN pixi --color never --no-progress -q list From 38411370554e4923667fe2a107a697fb456e7813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 21 Mar 2025 18:15:26 -0700 Subject: [PATCH 12/13] Revert "Forgot to copy the file." This reverts commit f4e62f8f1ddd18d7b7a50613036c52709b2a0c9a. --- windows_docker_resources/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index 424be0d5..18af80d9 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -38,7 +38,6 @@ RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex (( ARG ROS_DISTRO=rolling WORKDIR C:\pixi_ws ADD https://github.com/ros2/ros2.git#${ROS_DISTRO} /temp/ros2 -RUN copy C:\TEMP\ros2\pixi.toml #ADD https://raw.githubusercontent.com/ros2/ros2/${ROS_DISTRO}/pixi.toml pixi.toml RUN pixi --color never --no-progress -q install RUN pixi --color never --no-progress -q list From 2d98d8df9d985b315f933a26792b6e6d74549c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Fri, 21 Mar 2025 18:15:28 -0700 Subject: [PATCH 13/13] Revert "Try git repos again." This reverts commit d1e1e0a559e0ef88e09552472028cce0b259964e. --- windows_docker_resources/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/windows_docker_resources/Dockerfile b/windows_docker_resources/Dockerfile index 18af80d9..4f9c163d 100644 --- a/windows_docker_resources/Dockerfile +++ b/windows_docker_resources/Dockerfile @@ -37,8 +37,7 @@ RUN powershell -noexit "Set-ExecutionPolicy Bypass -Scope Process -Force; iex (( # Install dependencies via pixi ARG ROS_DISTRO=rolling WORKDIR C:\pixi_ws -ADD https://github.com/ros2/ros2.git#${ROS_DISTRO} /temp/ros2 -#ADD https://raw.githubusercontent.com/ros2/ros2/${ROS_DISTRO}/pixi.toml pixi.toml +ADD https://raw.githubusercontent.com/ros2/ros2/${ROS_DISTRO}/pixi.toml pixi.toml RUN pixi --color never --no-progress -q install RUN pixi --color never --no-progress -q list