Is there a reason why Docker images are sometimes pulled from cache?


I’ve noticed during the “Spin up Environment” stage it sometimes pulls the images from cache or re-downloads them. This is random across the 5 containers that I’m currently using. Is there someway I can tell it to always use the cached version? I’ve tried using the SHA256 for each image but that doesn’t seem to work either. If it uses the cache it takes 2 seconds. If it has to re-download, it take from 40 seconds to up to 3 minutes.


The hosts always use the cache, when it is available. The image is cached again when your build is run on a new host.


So the more we run our tests, the more chance we’ll get the cached image? How many hosts do you guys run?


You are correct. The number varies and is irrelevant.


Alright, thanks!