How do I cache Docker images?

My GitLab project is at Ruby on Racetracks / Rails Neutrino 6 · GitLab .

My continuous integration setup works, but I’d like to speed it up by caching Docker images. The Docker images I’d like to cache are the docker:stable image used to execute my CI setup, the registry.gitlab.com/rubyonracetracks/docker-debian-bullseye-rvm-rails-neutrino6 Docker image specified in the Dockerfile, and the ruby:3.0.2 Docker image used in the final part of my CI process.

The process of downloading and installing these Docker images takes up valuable minutes. I’d rather cache them for 12 to 24 hours so that I can finish the CI build sooner.

When either building docker images or pulling them from a registry they should be cache in your runners docker installation, indefinitely.

Could you provide more details regarding runners?