vegardit/docker-gitea-act-runner

Insecure registries using dind

Closed this issue · 3 comments

I was trying to do a POC on a local private network without SSL. Using docker out of docker works because I added the insecure registry to the host docker json. When using DIND though I can't get it to set the insecure registry.

I tried adding a build step

    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v3
      with:
        cache-binary: false
        config-inline: |
          [registry."localip:port"]
            http = true
            insecure = true

but the output only shows:

Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

Do you know where the docker json is stored on the embedded docker in the runner image so I can add the insecure registry?

I haven't tried but does setting it in /etc/docker/daemon.json work?

{
    "insecure-registries" : [ "myregistry:5000" ]
}

Yes that works. I created a Dockerfile to apply the changes pulling your image, Thanks!

you could also override the file via a mount without needing to create a new docker image. Something like docker run -v $(pwd)/my-docker-daemon-config.json:/etc/docker/daemon.json:ro