(system failure): Cannot connect to the Docker daemon

I’m having some issues building a Docker image with Gitlab CI.
You can find the the repo here: https://gitlab.com/Kerwood/rutorrent-container

My .gitlab-ci.yml file is pretty simple, but still, it fails.

stages:
  - build

variables:
  IMAGE: $CI_REGISTRY_IMAGE

 image-building:
  stage: build
  image: docker:latest
  services:
    - docker:dind
  script:
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
    - docker build -t $IMAGE .
    - docker push $IMAGE
    - docker tag $IMAGE $IMAGE:$CI_COMMIT_TAG
    - docker push $IMAGE:$CI_COMMIT_TAG
  only:
    - /^[0-9]+(\.[0-9]+)*$/
  except:
    - branches

This is the Dockerfile

What am I doing wrong?

Hi,

since it mentions a system failure on the runner itself, please try re-running the pipeline/job manually.

Screenshot 2020-05-05 at 13.50.29

You can do so by navigating into the pipeline listing at https://gitlab.com/Kerwood/rutorrent-container/pipelines with a retry button on the right side.

Cheers,
Michael

Hi… I have tried that multiple times.
I had the first failed job yesterday and figured that maybe it was a problem with the runners and waited until today and did a couple of retry’s.

In my Dockerfile I’m using 2 images. One for building/compiling and I copy the compiled binary’s to the next image, which is the final image.
It looks like the runner successfully pulls and runs the first image but dies at the end on it.

I’ve got another repo that fails the same way. The job and Dockerfile is basically the same though.