Gitlab runner / k8s executor / private registry: /root/.docker/ca.pem not found

Hi all,

Using OpenShift 4.2 and gitlab-runner-gitlab 12.3, with private registry, self-signed certs.

Upon the before_script: docker login …, we get the output:

$ docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $REGISTRY unable to resolve docker endpoint: open /root/.docker/ca.pem: no such file or directory

My .gitlab-ci.yml contains the following snippet:

image: docker:latest
services:

  • name: docker:dind
    entrypoint: [“dockerd-entrypoint.sh”]
    command: [“–insecure-registry”, “default-route-openshift-image-registry.apps.domain.tld.cc”]

and variables include:

GITSSL_NO_VERIFY: “true”
DOCKER_TLS_VERIFY: “0”

It doesn’t seem that docker-machine is installed, so cannot regenerate certs.

Scratching head and looking for some advice on this.

Many thanks