Install your own container registry and cache server
When using the Runner in autoscale mode, it is advised to set up a personal container registry and a cache server.
Install a proxy container registry
- Login to a dedicated machine where the container registry proxy will be running
- Make sure that Docker Engine is installed on that machine
-
Create a new container registry:
docker run -d -p 6000:5000 \ -e REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io \ --restart always \ --name registry registry:2
You can modify the port number (
6000
) to expose the registry on a different port -
Check the IP address of the server:
hostname --ip-address
You should preferably choose the private networking IP address. The private networking is usually the fastest solution for internal communication between machines of a single provider (DigitalOcean, AWS, Azure, etc) Usually the private networking is also not accounted to your monthly bandwidth limit.
- Docker registry will be accessible under
MY_REGISTRY_IP:6000
You can now proceed and
configure config.toml
to use the new registry server.
Install your own cache server
If you don’t want to use a SaaS S3 server, you can install your own S3-compatible caching server:
- Login to a dedicated machine where the cache server will be running
- Make sure that Docker Engine is installed on that machine
-
Start MinIO, a simple S3-compatible server written in Go:
docker run -it --restart always -p 9005:9000 \ -v /.minio:/root/.minio -v /export:/export \ --name minio \ minio/minio:latest server /export
You can modify the port
9005
to expose the cache server on different port -
Check the IP address of the server:
hostname --ip-address
- Your cache server will be available at
MY_CACHE_IP:9005
-
Create a bucket that will be used by the Runner:
sudo mkdir /export/runner
runner
is the name of the bucket in that case. If you choose a different bucket, then it will be different. All caches will be stored in the/export
directory. -
Read the Access and Secret Key of MinIO and use it to configure the Runner:
sudo cat /export/.minio.sys/config/config.json | grep Key
You can now proceed and
configure config.toml
to use the new cache server.