#!/bin/sh set -o errexit # Reference: https://kind.sigs.k8s.io/docs/user/local-registry/ # set no_proxy if applicable if [ ! -z "${no_proxy}" ]; then echo "Updating no_proxy env var"; export no_proxy=${no_proxy},kind-registry; export NO_PROXY=${no_proxy}; fi # create registry container unless it already exists reg_name='kind-registry' reg_port='5001' if [ "$(docker inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || true)" != 'true' ]; then docker run \ -d --restart=always -p "127.0.0.1:${reg_port}:5000" --name "${reg_name}" \ ghcr.io/project-zot/zot-minimal-linux-amd64:latest fi # create a cluster with the local registry enabled in containerd cat <