Reputation: 323
I've got some problems trying to set up CI using Gitlab and docker: the docker-compose build fails with error
Building web
Step 1/8 : FROM python:2.7-alpine
Service 'web' failed to build: Get https://registry-1.docker.io/v2/: net/http: TLS handshake timeout
ERROR: Job failed: exit code 1
Here is my gitlab-runner/config.toml:
concurrent = 1
check_interval = 0
[[runners]]
name = "Backend-django runner"
url = "http://gitlab.codewithme.today/ci"
token = "4976e4153178a33029e041a0f5fe07"
executor = "docker"
[runners.docker]
tls_verify = false
image = "python:2.7-alpine"
privileged = true
disable_cache = false
volumes = ["/cache"]
shm_size = 0
[runners.cache]
My own gitlab container registry works fine with letsencrypt-created certificates and the same procedure completes successfully locally on the same server with gitlab runner.
How can that problem be overcame?
Upvotes: 2
Views: 3208
Reputation: 11
https://docs.gitlab.com/ee/user/clusters/agent/work_with_agent.html
Overriding the MTU of the created network For some environments, like VMs in OpenStack, a custom MTU is necessary. The Docker daemon does not respect the MTU in docker.json (see moby issue), so you can set the network_mtu in your config.toml to any valid value. This instructs the Docker daemon to use the correct MTU for the newly-created network.
[runners.docker]
network_mtu = 1402
Upvotes: 1
Reputation: 188
Changing the parameter mtu=1300
on the network interface solved the problem.
Upvotes: 1