Networking problems in newly created gitlab-runner docker container
I am on:
OS: Ubuntu 14.04 LTS
Docker: 1.8.1, build d12ea79
Noticed that I can no longer access the network from inside a gitlab-runner docker container. The builds are pending and registering a new runner fails. Here is how I create the gitlab-runner container following instructions on https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/docker.md.
- Create new docker container
$ docker run -d --name gitlab-runner --restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /srv/gitlab-runner/config:/etc/gitlab-runner \
gitlab/gitlab-runner:latest
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8c316769a422 gitlab/gitlab-runner:latest "/entrypoint run --us" 1 minute ago Up 1 minute gitlab-runner
- Access container and check networking
$ docker exec -it gitlab-runner bash
root@8c316769a422:/# curl --verbose https://gitlab.com/
* Hostname was NOT found in DNS cache
* Could not resolve host: gitlab.com
* Closing connection 0
curl: (6) Could not resolve host: gitlab.com
What am I missing? Even pinging a public IP from inside the container times out. Thank you.