Another situation that can slow down building considerably is that the runners continuously download Docker containers from the internet. It is a much better idea to create a proxy for that. In runners.machine, you can specify which engine-registry-mirror should be used. If this is used on your local network, this saves a lot of traffic. Here, you see the section as I used it in our example project:
MachineOptions = [
"engine-registry-mirror=http://192.168.1.10:6000"
]
In the most basic way, the Docker Machine executor uses docker-machine to spawn new instances of the GitLab Runner container.
You can combine this with other features, such as shared caching and using a dedicate container registry to facilitate large amounts of instances.
If you enable these settings for your runner, you need to deploy a caching server and a registry mirroring service, which we will show you in the next section.