Can't register runner - clean/latest docker install

I’m trying to get a basic setup of GitLab with one shared runner working from docker containers, but I keep getting this when I try to register:

ERROR: Registering runner... forbidden (check registration token)  runner=Ds-3E59o
PANIC: Failed to register this runner. Perhaps you are having network problems 

These are the steps I take (tested from fresh by removing /srv/gitlab):

  1. Run GitLab:
# As per
sudo docker run --detach \
  --hostname \
  --env GITLAB_OMNIBUS_CONFIG="external_url ''; gitlab_rails['lfs_enabled'] = true;" \
  --publish 443:443 --publish 80:80 --publish 22:22 \
  --name gitlab \
  --restart always \
  --volume /srv/gitlab/config:/etc/gitlab \
  --volume /srv/gitlab/logs:/var/log/gitlab \
  --volume /srv/gitlab/data:/var/opt/gitlab \
  1. Run the runner:
# As per:
docker run -d --name gitlab-runner --restart always \
  -v /srv/gitlab-runner/config:/etc/gitlab-runner \
  -v /var/run/docker.sock:/var/run/docker.sock \
  1. Wait for gitlab to start, set root password, login as root, go to Configure GitLab -> Overview -> Runners, copy the access token.

  2. Attempt to register the runner:

# As per:
docker run --rm -v /srv/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner register \
    --non-interactive \
    --executor "docker" \
    --docker-image alpine:latest \
    --url "" \
    --registration-token "VMTMR8TysySosb6xuTLZ" \
    --description "docker-runner" \
    --tag-list "docker" \
    --run-untagged="true" \
    --locked="false" \

At this point, I get the error shown above.

I know it seem weird to run the runner and register it while it’s running but 1. the documentation has it this way and 2. I get the same result when registering first.

Am I doing something stupid?

FTR this was solved by using --network host on the gitlab/gilab-ce container.