Skip to content

helm - let us overwrite the docker:dind image #3997

Open

Description

@julien-michaud

Activity

  1. added
    community
    enhancement
    needs triage
    on Mar 26, 2025
  2. julien-michaud commented on Mar 26, 2025

    @julien-michaud
    Author

    a pr might already be ready #3851

  3. szc1wz commented on May 13, 2025

    @szc1wz

    hey @julien-michaud,
    In our deployment we achieved this by specifying the template part of the values in the json file and passing it to the helm deployment by --set-json tempate=$(json) and it works perfectly fine for us for a longer time already :)

  4. gdraynz commented on Jun 13, 2025

    @gdraynz

    Hello! We used to circumvent this by rewriting the template spec entirely for our needs, but it is no longer possible on 0.12.0 because a dind initContainer is now always added regardless of the template spec values. 😞

  5. andrey-petrenko-develeap commented on Aug 19, 2025

    @andrey-petrenko-develeap

    hey @julien-michaud, In our deployment we achieved this by specifying the template part of the values in the json file and passing it to the helm deployment by --set-json tempate=$(json) and it works perfectly fine for us for a longer time already :)

    Hi, @szc1wz ! Could you provide an example, please?

  6. dalvarezquiroga commented on Mar 11, 2026

    @dalvarezquiroga

    Any example to overwrite the image pls? @szc1wz

  7. szc1wz commented on Mar 12, 2026

    @szc1wz

    @dalvarezquiroga and @andrey-petrenko-develeap, sure, there is a template added in the values file starting of line 305: https://github.com/actions/actions-runner-controller/blob/master/charts/gha-runner-scale-set/values.yaml#L305
    what we did, is we saved it as a json file like this:
    { "spec": { "serviceAccountName": null, "initContainers": [ { "name": "dind-externals", "image": null, "command": [ "cp", "-r", "-v", "/home/runner/externals/.", "/home/runner/tmpDir/" ], "imagePullPolicy": null, "volumeMounts": [ { "name": "dind-externals", "mountPath": "/home/runner/tmpDir" } ] } ], "containers": [ { "name": "runner", "image": null, "command": [ "/home/runner/run.sh" ], "env": [ { "name": "DOCKER_HOST", "value": "unix:///var/run/docker.sock" } ], "imagePullPolicy": null, "volumeMounts": [ { "name": "work", "mountPath": "/home/runner/_work" }, { "name": "dind-sock", "mountPath": "/var/run" } ] }, { "name": "dind", "image": null, "args": [ "dockerd", "--host=unix:///var/run/docker.sock", "--group=$(DOCKER_GROUP_GID)" ], "env": [ { "name": "DOCKER_GROUP_GID", "value": "121" } ], "securityContext": { "privileged": true }, "volumeMounts": [ { "name": "work", "mountPath": "/home/runner/_work" }, { "name": "dind-sock", "mountPath": "/var/run" }, { "name": "dind-externals", "mountPath": "/home/runner/externals" } ] } ], "volumes": [ { "name": "work", "emptyDir": {} }, { "name": "dind-sock", "emptyDir": {} }, { "name": "dind-externals", "emptyDir": {} } ] } }

    and here you can either put a static values there or dynamically put the values there with a script which would replace the values.
    Next execute the helm command like this:
    helm upgrade <runner-name> --install --namespace <namespace> --create-namespace --version 0.13.0 --values ../values.plain.yaml --wait --timeout 10m oci://something.azurecr.io/helm/gha-runner-scale-set --set-json template=yourjson

  8. dalvarezquiroga commented on Mar 12, 2026

    @dalvarezquiroga

    Ah yeah, thanks. Anyway, @szc1wz, if I'm not wrong, we can't set the image differently... it forces you to configure all the other values, right? Or when you enter null, does it use the default helm chart values?

  9. szc1wz commented on Mar 12, 2026

    @szc1wz

    so basically, this is the bare minimum which you need to pass in order to change the container images for the docker in docker container, as far as I know. And basically these are the default values (maybe except the DOCKER_GROUP_GID which by default is 123).

  10. BowlesCR commented on Apr 21, 2026

    @BowlesCR

    I'm doing this by overriding the initContainers array. Pretty gross and fragile, but it does work (for now)
    --set "template.spec.initContainers[1].image=${{ needs.merge.outputs.registry }}/docker-hub/library/docker:dind"

  11. Moep90 commented on Oct 21, 2026

    @Moep90

    Swapping the image after rendering works. Kustomize's images transformer also reaches into the AutoscalingRunnerSet, so it finds dind in initContainers on Kubernetes 1.29+ and in containers on older clusters. Render with helm template --kube-version <your cluster version> so the chart picks the layout your cluster gets:

    resources:
      - helm.yaml
    images:
      - name: docker
        newName: mirror.gcr.io/library/docker
        newTag: 29.9.1-dind
        digest: sha256:3e5756e2b6dad6a5f1f5deacf0a19f9eaa2581b76ae092b2d4a118162e1d4d4e

    With Kapitan's mutate generator it's a JSON Patch. The test op makes the compile fail if dind isn't the second init container:

    parameters:
      mutations:
        dind-image:
          match: {apiVersion: actions.github.com/v1alpha1, kind: AutoscalingRunnerSet, name: arc-runners}
          json6902:
            - {op: test, path: /spec/template/spec/initContainers/1/name, value: dind}
            - op: replace
              path: /spec/template/spec/initContainers/1/image
              value: mirror.gcr.io/library/docker:29.9.1-dind@sha256:3e5756e2b6dad6a5f1f5deacf0a19f9eaa2581b76ae092b2d4a118162e1d4d4e

    There's also runner.dind.container.image in gha-runner-scale-set-experimental 0.15.0, but its release notes say the experimental charts aren't supported for production.

    Tested against 0.15.0 on kind, full write-up: https://kadet-hub.org/blog/actions-runner-controller-dind/#arc-dind-image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    communityenhancementneeds triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions