Skip to content

Conversation

@larskanis
Copy link
Member

This optimization drops the download size of all snapshot images to 3GB:

amd64-linux     all-separate        :        5435 MB
arm64-linux     all-separate        :        5297 MB
amd64-linux     all-combined        :        3040 MB
arm64-linux     all-combined        :        2999 MB

Whereas version 1.10.0 is almost 6GB:

amd64-linux     all-separate        :        6135 MB
arm64-linux     all-separate        :        5938 MB
amd64-linux     all-combined        :        5793 MB
arm64-linux     all-combined        :        5616 MB

The generally decreased download size (from 6135MB to 5435MB, etc.) is due to the recent change of the compression method from gzip to zstd.

If images are built independent, they don't share common layers.
Running the push with all caches combined fixes this.
Image builds depend on $TARGETPLATFORM instead of host_platform now, so that the Dockerfile content is the same accross host platforms.
The RCD platform images can share common docker image layers for files that are not related to the target platform.
This is the base installation with native ruby.
All -musl platforms can share the common musl setup.
All darwin platforms can share the common osxcross setup.

So this moves one part of the Dockerfile more to the front, since it's not platform dependent.

This also adds a new rake task "release:sizes" to check the images.
It shows the real download amount of all platform images (all-combined) and the sumup of all layers of all platform images when downloaded separately.

This optimization drops the download size of all snapshot images to 3GB:

amd64-linux     all-separate        :        5435 MB
arm64-linux     all-separate        :        5297 MB
amd64-linux     all-combined        :        3040 MB
arm64-linux     all-combined        :        2999 MB

Whereas version 1.10.0 is almost 6GB:

amd64-linux     all-separate        :        6135 MB
arm64-linux     all-separate        :        5938 MB
amd64-linux     all-combined        :        5793 MB
arm64-linux     all-combined        :        5616 MB

The generally decreased download size (from 6135MB to 5435MB, etc.) is due to the recent change of the compression method from gzip to zstd.
@larskanis larskanis force-pushed the size branch 2 times, most recently from 0867b73 to 275666f Compare October 29, 2025 14:03
@larskanis
Copy link
Member Author

I think this is a valuable improvement. The build times of publish and release workflows are somewhat raised, but the image size improvement beats this.

@larskanis larskanis merged commit 9330c84 into main Oct 30, 2025
765 of 774 checks passed
@larskanis larskanis deleted the size branch October 30, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants