Registering runner error using gitlab-runner installed via docker

docker run --rm -it -v /srv/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner register

After running the command above I the get this response

ERROR: Registering runner... failed runner=runnnerdata status=couldn't execute POST against https://gitlab.com/api/v4/runners: Post "https://gitlab.com/api/v4/runners": dial tcp: i/o timeout

I’ve tried to use different versions of the gitlab-runner and nothing seems to work

Hi,
this conversation might be useful for you: https://stackoverflow.com/questions/44458410/gitlab-ci-runner-ignore-self-signed-certificate

Also see GitLab docu: Run GitLab Runner in a container | GitLab

Best,
Bodo