While trying to optimize spin-up time for our docker containers, I’ve noticed a wide variance in startup time. I know that sometimes the docker images already exist on the main machine and then things startup faster. I was thinking that perhaps we could optimize startup times by choosing a different set of images that are more likely to be cached. However, I have not found any way to check what alternative images might be more common.
So would it be possible to find a list of images that already exist during container startup? Or is there perhaps a centralized location that shows the circleci network of machines and lists the prevelence of various docker images across that?
Hypothetical example: Say, we we have a ruby app that runs fine in any ruby version 2.5 or above.
Say we’re using the ruby 2.5 container base image currently, and that is pre-cached on 10% of machines, ruby 2.6 is pre-cached on 25% of machines, Ruby 2.7 is precached on 30% of machines, and ruby 3.0 is on 20% of machines.
For fastest startup time, we should be using ruby 2.7 (with the assumption that the app being tested works equally well for all ruby versions).
Is there any way to determine those percentages?