From 38474216888b523b8eb3a9d3d892dda4c0b1f9e5 Mon Sep 17 00:00:00 2001 From: WrenIX Date: Fri, 21 Feb 2025 12:10:49 +0100 Subject: [PATCH] init workaround with crane --- README.md | 8 ++++++++ mirror.sh | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 README.md create mode 100755 mirror.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..b9852d7 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +Download / Update new images + + +## Helper +Get all images from kubernetes +```bash +kubectl get pods --all-namespaces -o jsonpath="{.items[*].spec['initContainers', 'containers'][*].image}" | tr -s '[[:space:]]' '\n' | sort | uniq -c +``` diff --git a/mirror.sh b/mirror.sh new file mode 100755 index 0000000..3fe22de --- /dev/null +++ b/mirror.sh @@ -0,0 +1,33 @@ +#/bin/sh +export REGISTRY=${1:-git.chaos.fyi/mirror} + +set -e + +echo "Mirror image to ${REGISTRY}" + +echo "docker.io" + +IMAGE=bitnami/redis:7.4.2-debian-12-r5 +crane copy "docker.io/${IMAGE}" "${REGISTRY}/${IMAGE}" +IMAGE=bitnami/redis:7.4.2-debian-12-r4 +crane copy "docker.io/${IMAGE}" "${REGISTRY}/${IMAGE}" +IMAGE=bitnami/redis +crane copy "docker.io/${IMAGE}" "${REGISTRY}/${IMAGE}" + +IMAGE=bitnami/redis-exporter:1.67.0-debian-12-r9 +crane copy "docker.io/${IMAGE}" "${REGISTRY}/${IMAGE}" + +IMAGE=library/nginx:1.27.4 +crane copy "docker.io/${IMAGE}" "${REGISTRY}/${IMAGE}" + +IMAGE=library/docker:28.0.0-dind +crane copy "docker.io/${IMAGE}" "${REGISTRY}/${IMAGE}" + +IMAGE=superseriousbusiness/gotosocial:0.18.0 +crane copy "docker.io/${IMAGE}" "${REGISTRY}/${IMAGE}" + + + +echo "ghcr.io" +IMAGE=metal-stack/oci-mirror +crane copy "ghcr.io/${IMAGE}" "${REGISTRY}/${IMAGE}"