CI jobs super slow to setup the environment

My CI jobs all use the same 400Mb Docker image.

Every job starts by pulling the image which takes 40 seconds on Gitlab shared runners.

Is there any way to make this pulling faster? I tried caching for example but it didn’t change anything.

+1 on this question.

See also this issue: Pulling docker image is too slow (#1767) · Issues · / gitlab-runner · GitLab

I have tried using Gitlab’s own package registry to cache my docker image, but it still takes 4 minutes to pull for EACH job, which is exactly the same time it takes to pull from dockerhub…
But the default image (ruby-2.5) pulls instantly.

I can understand that GitLab don’t want to keep an unlimited number of huge images locally on their servers. And I don’t mind pulling a large image for the complicated ‘build’ step. But the problem for me is that the basic ruby-2.5 image doesn’t have the basic tools required for static analysis and testing. For example I want to have a clang-check step, but the basic image doesn’t have clang-format.

Are there any other images (like ruby-2.5) which have a few more tools available? Is there a list of docker images that are available locally on GitLab’s servers? Or is it just ruby-2.5?