-
Notifications
You must be signed in to change notification settings - Fork 31
Fetch pixi.toml directly from a git repository clone. #806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
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.
@@ -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 | |||
RUN powershell -noexit irm https://raw.githubusercontent.com/ros2/ros2/refs/heads/%ROS_DISTRO%/pixi.toml -OutFile pixi.toml | |||
ADD https://raw.githubusercontent.com/ros2/ros2/${ROS_DISTRO}/pixi.toml pixi.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Since this command is expanded by docker not CMD or powershell the sh-style variable expansion is what works.
This will probably need to be de-conflicted with #807 depending on which merges first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me!
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.