hosts = [ "kankali.darkhelm.lan", "zhokq.darkhelm.lan", "urtzul.darkhelm.lan", "pi-desktop.darkhelm.lan", ] mirror_image = "kankali.darkhelm.lan:3001/darkhelm.org/act-ubuntu:act-latest" ghcr_runner_image = "ghcr.io/catthehacker/ubuntu:act-latest" renovate_image = "ghcr.io/renovatebot/renovate:41" python_image = "python:3.14-slim" node_image = "node:20-bookworm-slim" # Check both upstream and mirrored tags on each runner host. remote_script = """ def local_state(label, image): r = !(docker image inspect @(image) > /dev/null 2> /dev/null) print(f"{label}:present" if r.returncode == 0 else f"{label}:missing") local_state("UBUNTU22", "ubuntu:22.04") local_state("PYTHON", "__PYTHON_IMAGE__") local_state("NODE", "__NODE_IMAGE__") local_state("GHCR", "__GHCR_RUNNER_IMAGE__") local_state("MIRROR_LOCAL", "__MIRROR_IMAGE__") local_state("RENOVATE", "__RENOVATE_IMAGE__") r = !(docker info 2> /dev/null | grep -qi "kankali.darkhelm.lan:3001") print("REGISTRY_CONFIG:ok" if r.returncode == 0 else "REGISTRY_CONFIG:missing") def remote_pull(label, image, log_path): pull = !(docker pull @(image) > @(log_path) 2>&1) if pull.returncode == 0: print(f"{label}:pull-ok") return mismatch = !(grep -qi "http response to https client" @(log_path)) if mismatch.returncode == 0: print(f"{label}:https-mismatch") else: print(f"{label}:pull-failed") remote_pull("UBUNTU22_REMOTE", "ubuntu:22.04", "/tmp/ubuntu22-pull.log") remote_pull("PYTHON_REMOTE", "__PYTHON_IMAGE__", "/tmp/python-pull.log") remote_pull("NODE_REMOTE", "__NODE_IMAGE__", "/tmp/node-pull.log") remote_pull("GHCR_REMOTE", "__GHCR_RUNNER_IMAGE__", "/tmp/ghcr-runner-pull.log") remote_pull("MIRROR_REMOTE", "__MIRROR_IMAGE__", "/tmp/mirror-pull.log") remote_pull("RENOVATE_REMOTE", "__RENOVATE_IMAGE__", "/tmp/renovate-pull.log") local_state("UBUNTU22_AFTER_PULL", "ubuntu:22.04") local_state("PYTHON_AFTER_PULL", "__PYTHON_IMAGE__") local_state("NODE_AFTER_PULL", "__NODE_IMAGE__") local_state("GHCR_AFTER_PULL", "__GHCR_RUNNER_IMAGE__") local_state("MIRROR_AFTER_PULL", "__MIRROR_IMAGE__") local_state("RENOVATE_AFTER_PULL", "__RENOVATE_IMAGE__") """ remote_script = ( remote_script .replace("__MIRROR_IMAGE__", mirror_image) .replace("__GHCR_RUNNER_IMAGE__", ghcr_runner_image) .replace("__RENOVATE_IMAGE__", renovate_image) .replace("__PYTHON_IMAGE__", python_image) .replace("__NODE_IMAGE__", node_image) ) for host in hosts: print(f"\n=== {host} ===") ssh @(host) @(remote_script)