github.com/nilium/gitlab-runner@v12.5.0+incompatible/docs/install/registry_and_cache_servers.md (about) 1 # Install your own container registry and cache server 2 3 When using the Runner in [autoscale mode](../configuration/autoscale.md), it 4 is advised to set up a personal container registry and a cache server. 5 6 ## Install a proxy container registry 7 8 1. Login to a dedicated machine where the container registry proxy will be running 9 1. Make sure that [Docker Engine](https://docs.docker.com/install/) is installed 10 on that machine 11 1. Create a new container registry: 12 13 ```bash 14 docker run -d -p 6000:5000 \ 15 -e REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io \ 16 --restart always \ 17 --name registry registry:2 18 ``` 19 20 You can modify the port number (`6000`) to expose the registry on a 21 different port 22 23 1. Check the IP address of the server: 24 25 ```bash 26 hostname --ip-address 27 ``` 28 29 You should preferably choose the private networking IP address. The private 30 networking is usually the fastest solution for internal communication 31 between machines of a single provider (DigitalOcean, AWS, Azure, etc) 32 Usually the private networking is also not accounted to your monthly 33 bandwidth limit. 34 35 1. Docker registry will be accessible under `MY_REGISTRY_IP:6000` 36 37 You can now proceed and 38 [configure `config.toml`](../configuration/autoscale.md#distributed-container-registry-mirroring) 39 to use the new registry server. 40 41 ## Install your own cache server 42 43 If you don't want to use a SaaS S3 server, you can install your own 44 S3-compatible caching server: 45 46 1. Login to a dedicated machine where the cache server will be running 47 1. Make sure that [Docker Engine](https://docs.docker.com/install/) is installed 48 on that machine 49 1. Start [minio](https://min.io), a simple S3-compatible server written in Go: 50 51 ```bash 52 docker run -it --restart always -p 9005:9000 \ 53 -v /.minio:/root/.minio -v /export:/export \ 54 --name minio \ 55 minio/minio:latest server /export 56 ``` 57 58 You can modify the port `9005` to expose the cache server on different port 59 60 1. Check the IP address of the server: 61 62 ```bash 63 hostname --ip-address 64 ``` 65 66 1. Your cache server will be available at `MY_CACHE_IP:9005` 67 1. Create a bucket that will be used by the Runner: 68 69 ``` 70 sudo mkdir /export/runner 71 ``` 72 73 `runner` is the name of the bucket in that case. If you choose a different 74 bucket, then it will be different. All caches will be stored in the 75 `/export` directory. 76 77 1. Read the Access and Secret Key of minio and use it to configure the Runner: 78 79 ``` 80 sudo cat /export/.minio.sys/config/config.json | grep Key 81 ``` 82 83 You can now proceed and 84 [configure `config.toml`](../configuration/autoscale.md#distributed-runners-caching) 85 to use the new cache server.