Skip to content

Docker and DinD fails with latest version (1.13)

Summary

Since today, I got this error message when I want to build a docker image with gitlab-runner: "Cannot connect to the Docker daemon at tcp://docker:2375. Is the docker daemon running?"

Environment description

I am pretty confident in my gitlab-runner configs, it used to work so it is not related to a privileged mode disable or something.

My .gitlab-ci is:

docker:build:
  stage: containerize
  only:
    - tags
  image: docker:latest
  services:
    - docker:dind
  ...

The only thing that I can see changed since yesterday is the version of the docker latest image, which is now 1.13 (https://github.com/docker-library/docker/commits/master).

Workaround

I've updated my .gitlab-ci to explicitly use docker:1.12 and docker:1.12-dind, my issue is resolved.

I don't know if the issue is in docker (1.13) or in how it is used in gitlab-runner, yet I'll be intersted to know if I am the only one to experience that, and if you know how to use the latest version here.

Used GitLab Runner version

gitlab-runner 1.9.4 with docker executor