
GitLab Container Virtual Registry with Docker Hardened Images
3/12/2026
Introduces and details GitLab's Container Virtual Registry, a new capability that functions as a pull-through cache for upstream container registries. The post explains the problem of managing multiple registries, credential sprawl, and slow build times. It describes how the virtual registry works by caching images from configured upstreams (Docker Hub, dhi.io, MCR, Quay.io) and serving them from GitLab's infrastructure. It provides setup instructions using a Python client and a `.gitlab-ci.yml` example, and discusses practical considerations like cache validity and upstream priority. It also highlights the benefits for Docker Hardened Images and provides performance metrics.















