Use insecure-registry in gitlab-runner

Hi,

I was able to use a local insecure registry in our internal ip-based gitlab. But it seems that the docker daemon used by dind in the runner does not have the insecure-registry flag set. Also, where do I store the the self-signed tls cert?

Edit: Add build test screen

Edit2: sample .gitlab.yml

image: docker:latest
services:
  - docker:dind
stages:
  - build
variables:
  CONTAINER_TEST_IMAGE: 10.xxx.xxx.xxx/org/proj:$CI_BUILD_REF_NAME
before_script:
  - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN 10.xxx.xxx.xxx:5000
build:
  stage: build
  script:
    - docker build --pull -t $CONTAINER_TEST_IMAGE .
    - docker push $CONTAINER_TEST_IMAGE
1 Like

I’ve opened an Issue on a similar problem (https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1842)
We are using our internal gitlab registry with a self signed certificat and it don’t work.
Manually running the docker image and mounting the /etc/docker/certs.d directory from the host where I’ve put the public certificate it will work. I’ve configured the volumes to mount the directory to the image but it only mount it on the docker image not on the docker:dind (that is just a service).
It would be nice to being able to pass some options or mount a volume inside the service image too (I’m not really good at docker, just started to use it so it’s possible I’m missing something on the configuration side).