[GH-ISSUE #782] Issue: container-tools/kind-action@v1.5.0 (registry:true) not working #487

Closed
opened 2026-03-01 21:43:51 +03:00 by kerem · 6 comments
Owner

Originally created by @kanedafromparis on GitHub (Aug 20, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/782

System information

- Operating System: macOS 
- Architecture: x64 (64-bit) 
- Apple M1: no
- Docker version: 20.10.6
- Docker image used in `act`: catthehacker/ubuntu:act-latest (digests sha256:26199cb25652c2f8a373cd5891fc9fee75f3f509d0667f35e7eabdc5e0be7713)
- `act` version: act version 0.2.24

Expected behaviour

Actual behaviour

this action :

        - name: Create Kubernetes KinD Cluster (ACT)
          uses: container-tools/kind-action@v1.5.0
          with:
            cluster_name: tomcat-local-apply
            registry: true

works in github action but not locally.

Workflow and/or repository

I set a sample repository : https://github.com/kanedafromparis/act-issue-with-kind-registry/

Steps to reproduce

just run act

act output

Log
[Sample integration test/kind_integration_test]   🐳  docker exec cmd=[node /var/run/act/actions/container-tools-kind-action@v1.5.0/main.js] user=
| Creating registry "kind-registry" on port 5000 from image "registry:2"...
| 127.0.0.1 kind-registry
| jq: error: Could not open file /etc/docker/daemon.json: No such file or directory
| docker: unrecognized service
Originally created by @kanedafromparis on GitHub (Aug 20, 2021). Original GitHub issue: https://github.com/nektos/act/issues/782 <!-- - Make sure you are able to reproduce it on the [latest version](https://github.com/nektos/act/releases) - Search the existing issues. - Refer to [README](https://github.com/nektos/act/blob/master/README.md). --> ## System information - Operating System: macOS - Architecture: x64 (64-bit) - Apple M1: no - Docker version: 20.10.6 - Docker image used in `act`: catthehacker/ubuntu:act-latest (digests sha256:26199cb25652c2f8a373cd5891fc9fee75f3f509d0667f35e7eabdc5e0be7713) - `act` version: act version 0.2.24 ## Expected behaviour <!-- - Describe how whole process should go and finish --> ## Actual behaviour this action : ```yaml - name: Create Kubernetes KinD Cluster (ACT) uses: container-tools/kind-action@v1.5.0 with: cluster_name: tomcat-local-apply registry: true ``` works in [github action](https://github.com/kanedafromparis/act-issue-with-kind-registry/actions/runs/1151462018) but not locally. ## Workflow and/or repository I set a sample repository : https://github.com/kanedafromparis/act-issue-with-kind-registry/ ## Steps to reproduce just run `act` ## `act` output <details> <summary>Log</summary> ```none [Sample integration test/kind_integration_test] 🐳 docker exec cmd=[node /var/run/act/actions/container-tools-kind-action@v1.5.0/main.js] user= | Creating registry "kind-registry" on port 5000 from image "registry:2"... | 127.0.0.1 kind-registry | jq: error: Could not open file /etc/docker/daemon.json: No such file or directory | docker: unrecognized service ``` </details>
kerem 2026-03-01 21:43:51 +03:00
Author
Owner

@johnpoth commented on GitHub (Sep 15, 2021):

Ran into the same issue. That being said, it might be tricky to restart docker within docker ...

<!-- gh-comment-id:920033739 --> @johnpoth commented on GitHub (Sep 15, 2021): Ran into the same issue. That being said, it might be tricky to restart docker within docker ...
Author
Owner

@catthehacker commented on GitHub (Sep 15, 2021):

This should be possible with live-restore option but it would require user to configure it first or run act as root (sudo/doas/su)

<!-- gh-comment-id:920115360 --> @catthehacker commented on GitHub (Sep 15, 2021): This should be possible with [`live-restore`](https://docs.docker.com/config/containers/live-restore/) option but it would require user to configure it first or run `act` as root (`sudo`/`doas`/`su`)
Author
Owner

@johnpoth commented on GitHub (Sep 15, 2021):

The script that's being run is trying to restart docker via sudo service docker restart inside act's docker container catthehacker/ubuntu:act-20.04, which doesn't exist hence the error.
It's trying to restart Docker because it added an insecure registry to /etc/docker/deamon.json (the file doesn't even exists in act's docker container).
This is all because this action it thinks it's on the root machine and not in a docker container

<!-- gh-comment-id:920129194 --> @johnpoth commented on GitHub (Sep 15, 2021): The script that's being run is [trying](https://github.com/container-tools/kind-action/blob/e7d0dcb30a69f6e36299e015e60d0fbf72d085d3/registry.sh#L136) to restart docker via ` sudo service docker restart ` inside `act`'s docker container `catthehacker/ubuntu:act-20.04`, which doesn't exist hence the error. It's trying to restart Docker because it added an insecure registry to /etc/docker/deamon.json (the file doesn't even exists in `act`'s docker container). This is all because this action it thinks it's on the root machine and not in a docker container
Author
Owner

@kanedafromparis commented on GitHub (Sep 16, 2021):

Hi, thank for your feed back.

I did found a way around using registry: false and kind load image-archive

WDYT ?

<!-- gh-comment-id:920684257 --> @kanedafromparis commented on GitHub (Sep 16, 2021): Hi, thank for your feed back. I did found a way around using [registry: false](https://github.com/kanedafromparis/act-issue-with-kind-registry/blob/testing-hack/.github/workflows/kind-registry-example.yml#L19) and [kind load image-archive](https://github.com/kanedafromparis/act-issue-with-kind-registry/blob/testing-hack/.github/workflows/kind-registry-example.yml#L52) WDYT ?
Author
Owner

@johnpoth commented on GitHub (Sep 16, 2021):

yeah me too then in a step just before the kind-action something like:

    - name: Configure docker registry
      if: ${{ env.ACT }}
      run: |
        sudo mkdir -p /etc/kind-registry
        cat <<EOF | sudo dd status=none of=/etc/kind-registry/config.yaml
        kind: Cluster
        apiVersion: kind.x-k8s.io/v1alpha4
        containerdConfigPatches:
        - |-
          [plugins."io.containerd.grpc.v1.cri".registry.mirrors."${KIND_REGISTRY}"]
            endpoint = ["http://${KIND_REGISTRY}"]
        EOF
        sudo chmod a+r /etc/kind-registry/config.yaml

and after something like

    - name: Configure docker registry
      if: ${{ env.ACT }}
      run: |
        cat <<EOF | kubectl apply -f -
        apiVersion: v1
        kind: ConfigMap
        metadata:
          name: local-registry-hosting
          namespace: kube-public
        data:
          localRegistryHosting.v1: |
            host: "${KIND_REGISTRY}"
            help: "https://kind.sigs.k8s.io/docs/user/local-registry/"
        EOF

So that the kind cluster is setup to use your local registry.

<!-- gh-comment-id:920693506 --> @johnpoth commented on GitHub (Sep 16, 2021): yeah me too then in a step just before the `kind-action` something like: ``` - name: Configure docker registry if: ${{ env.ACT }} run: | sudo mkdir -p /etc/kind-registry cat <<EOF | sudo dd status=none of=/etc/kind-registry/config.yaml kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 containerdConfigPatches: - |- [plugins."io.containerd.grpc.v1.cri".registry.mirrors."${KIND_REGISTRY}"] endpoint = ["http://${KIND_REGISTRY}"] EOF sudo chmod a+r /etc/kind-registry/config.yaml ``` and after something like ``` - name: Configure docker registry if: ${{ env.ACT }} run: | cat <<EOF | kubectl apply -f - apiVersion: v1 kind: ConfigMap metadata: name: local-registry-hosting namespace: kube-public data: localRegistryHosting.v1: | host: "${KIND_REGISTRY}" help: "https://kind.sigs.k8s.io/docs/user/local-registry/" EOF ``` So that the `kind` cluster is setup to use your local registry.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 17, 2021):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:945024172 --> @github-actions[bot] commented on GitHub (Oct 17, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#487
No description provided.