Search code examples
dockergitlabdocker-composegitlab-cigitlab-ci-runner

Gitlab-ci and docker compose: tls handshake timeout


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?


Solution

  • Changing the parameter mtu=1300 on the network interface solved the problem.