-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Update docker images to share scripts when possible #42201
Comments
Thanks for writing this up @malbarbo! If you're interested, want to write out some detailed steps for how to accomplish this? If we've got that listed we could likely list this as E-easy which would probably help get the work items here picked off very quickly! |
@alexcrichton I wrote the steps. What do you think? Is it enough? |
Looks great! If anyone's got any follow-up questions please feel free to ask here! @malbarbo I think there were some examples of this in a previous PR of yours as well, mind linking those here? |
@alexcrichton I linked the android dockerfile updates. |
Looks like @venkatagiri has taken care of the |
…chton use shared scripts for init and sccache in cross image cc rust-lang#42201 cc @malbarbo
…ichton use shared scripts for init and sccache in cross image cc rust-lang#42201 cc @malbarbo
#41958 added the possibility of sharing scripts used in docker images. This allows, for example, to use the same script to install sccache in all images, consequently updating sccache can be done updating only one file.
We should update all images to share scripts when possible.
To update an image, one can follow these sequence of steps:
RUN
lines in the dockerfile of the image with scripts (likesccache.sh
anddum-init.sh
insrc/ci/docker/scripts/
, see for example the updates ofarm-android
anddist-android
). You can organize the dockerfile in sections to make it easy to follow. sccache should be installed last. This avoids the whole container rebuild when sscache is updated;COPY
lines are duplicated in other images (duplicated files can be found using the commandfdupes -r src/ci/
). If there are duplicated files, move then tosrc/ci/docker/scripts/
and update the docker files;src/ci/docker/run.sh image
with the modified image still works (docker is required).List of images (unchecked images need to be updated):
The text was updated successfully, but these errors were encountered: