I have private GitLab server running in the cloud (bitnami image). I have a custom domain registered with the public IP of Gitlab Server and letsencrypt certificate generated for this domain. I can access gitlab server by https://mycustomdomain/. I have installed gitlab-runner on linux host and successfully registered (docker executor) with gitlab server (https://mycustomdomain/).
Now when i then run the pipeline, it fails with following message:
Pulling docker image node:latest ...
Using docker image sha256:2a0d8959c8e1b967d926059e555fdd23926c8fff809a0cf5fab373e694bbce64 for node:latest ...
Running on runner-PcudM7CB-project-1-concurrent-0 via my-gitlab-worker...
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/root/microcities/.git/
Created fresh repository.
fatal: unable to access 'https://<my gitlab public IP>/root/microcities.git/': SSL: no alternative certificate subject name matches target host name 'my gitlab public IP'
ERROR: Job failed: exit code 1
Why does the runner/docker container refer to gitlab server by it's IP rather than by domain name?