Error when running CI job on a new runner

I installed Gitlab runner on a GCE instance following the steps here https://docs.gitlab.com/runner/install/linux-repository.html It is registered and shows up on gitlab.com. Now when I try to run a job on it, it fails with this error

Running with gitlab-ci-multi-runner 9.2.0 (adfc387)
on gitlab-runner-01 (1c1d62df)
Using Docker executor with image docker:latest …
Starting service docker:dind …
Pulling docker image docker:dind …
Using docker image docker:dind ID=sha256:dad68c231063399279d56e4b28b22d7a437e7bfd3466783bae0132ddd40e4046 for docker service…
Waiting for services to be up and running…
Using docker image sha256:3b3561f0e097be4b596a3571763e821d9f87cb9e18bd66194cc3213445b08a62 for predefined container…
Pulling docker image docker:latest …
Using docker image docker:latest ID=sha256:21afa2a3e1cd8fd2fa5266cfd91606373e385f59c0d6a5bbdfb1a52fdfdd8206 for build container…
Running on runner-1c1d62df-project-2088863-concurrent-0 via gitlab-runner-01…
Fetching changes…
HEAD is now at d76f1e1 Merge branch ‘openssl’ into ‘master’
Checking out d76f1e15 as master…
Skipping Git submodules setup
$ docker info
error during connect: Get http://docker:2375/v1.29/info: dial tcp: lookup docker on 169.254.169.254:53: no such host
ERROR: Job failed: exit code 1

I did add the user called gitlab-runner to sudoers and disabled apparmor. What else can be a roblem?

I have a similar issue. With the “shell” executor, it cannot connect to http://docker:2375/build because the lookup failed. The containers are on a user-defined bridge network (i.e. 172.20.0.*). Trying to manually set a host entry for “docker” gives other errors and wouldn’t be a proper fix anyway.

error during connect: Post http://docker:2375/build?buildargs={}&cachefrom=[]&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels={}&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=[REDACTED]&ulimits=null: dial tcp: lookup docker on 127.0.0.11:53: no such host
(domain names redacted for privacy)

This is just one of many errors I’ve encountered trying to get gitlab-runner working in any configuration. Whether dind or shell, I always run into a dead-end. I’ve been troubleshooting this for a week. The documentation at Run GitLab Runner in a container | GitLab must be out-of-date or incomplete. It doesn’t work out-of-the-box as expected, or it makes assumptions that aren’t indicated and aren’t necessarily true for all users. I’m about ready to give up.