GitLab is configured with the above instructions to be a dependency proxy for Docker. The group https://gitlab.lakedrops.com/groups/docker is configured to be the public endpoint for that.
We can now use gitlab.lakedrops.com/docker/dependency_proxy/containers as prefix for all images that originally come from Docker hub. For this to work, the user needs to be authenticated with our registry. Like we already did docker login registry.lakedrops.com, we now also need to do docker login gitlab.lakedrops.com once, so that Docker images can be pulled over our own proxy.
In our Drupal projects, we don't have to configure that proxy for each project. Instead, it's sufficient to define an env variable in ~/.env containing a line DOCKER_IMAGE_PREFIX=gitlab.lakedrops.com/docker/dependency_proxy/containers. Our composer plugin docker4drupal will then use that prefix when updating the docker-compose.yml file and then always keep pulling from our proxy.
For our pipelines, we only had to define CI-variables for DOCKER_AUTH_CONFIG and DOCKER_IMAGE_PREFIX. With that in place, all pipelines are now automatically using the docker proxy setup.
@danielspeicher@richardpapp when you want to use this in your local dev environment as well, you only have to do docker login gitlab.lakedrops.com once and then define DOCKER_IMAGE_PREFIX=gitlab.lakedrops.com/docker/dependency_proxy/containers in your ~/.env, that's all.
I tag this with the documentation label so that we can add this there as well.