init workaround with crane

This commit is contained in:
WrenIX 2025-02-21 12:10:49 +01:00
commit e2b21e7cdc
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
2 changed files with 46 additions and 0 deletions

8
README.md Normal file
View file

@ -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
```

38
mirror.sh Executable file
View file

@ -0,0 +1,38 @@
#/bin/sh
export REGISTRY=${1:-git.chaos.fyi/mirror}
set -e
echo "Mirror image to ${REGISTRY}"
echo ""
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.1
crane copy "docker.io/${IMAGE}" "${REGISTRY}/${IMAGE}"
IMAGE=superseriousbusiness/gotosocial:0.18.0
crane copy "docker.io/${IMAGE}" "${REGISTRY}/${IMAGE}"
echo ""
echo "ghcr.io"
IMAGE=metal-stack/oci-mirror
crane copy "ghcr.io/${IMAGE}" "${REGISTRY}/${IMAGE}"