dockergitlabgitlab-cigitlab-ci-runner

What is 'gitlab/gitlab-runner-helper' docker image used for?


My overall goal is to install a self-hosted gitlab-runner that is restricted to use prepared docker images from my own docker registry only.

For that I have a system.d configuration that looks like:

/etc/systemd/system/docker.service.d/allow-private-registry-only.conf

BLOCK_REGISTRY='--block-registry=all'
ADD_REGISTRY='--add-registry=my.private.registry:8080'

By this, docker pull is allowed to pull images from my.private.registry/ only.

After I had managed to get this working, I wanted to clean up my local registry and remove old docker images. It was during that process when I stumbled over a docker image named gitlab/gitlab-runner-helper which presumably is some component used by the gitlab-runner itself and presumably has been pulled from docker.io.

Now I'm wondering if it is even possible/advisable to block images from docker.io when using a gitlab-runner?

Any hints are appreciated!


Solution

  • gitlab-runner-helper image is used by GitLab Runner to handle Git, artifacts, and cache operations for docker, docker+machine or kubernetes executors.

    As you prefer pulling an image from a private registry, you can override the helper image. Your configuration could be :

    [[runners]]
      (...)
      executor = "docker"
      [runners.docker]
        (...)
        helper_image = "my.private.registry:8080/gitlab/gitlab-runner-helper:tag"
    

    Please ensure the image is present on your registry or your configuration enable proxying docker hub or registry.gitlab.com. For this last, you need to run at least Gitlab runner version 13.7 and having enabled FF_GITLAB_REGISTRY_HELPER_IMAGE feature flag.