A container registry that uses the AT Protocol for manifest storage and S3 for blob storage.
atcr.io
docker
container
atproto
go
1#!/bin/bash
2set -e
3
4# Configuration
5SOURCE_REGISTRY="ghcr.io/evanjarrett/hsm-secrets-operator"
6TARGET_REGISTRY="atcr.io/evan.jarrett.net/hsm-secrets-operator"
7TAG="latest"
8
9# Image digests
10AMD64_DIGEST="sha256:274284a623810cf07c5b4735628832751926b7d192863681d5af1b4137f44254"
11ARM64_DIGEST="sha256:b57929fd100033092766aad1c7e747deef9b1e3206756c11d0d7a7af74daedff"
12
13echo "=== Migrating multi-arch image from GHCR to ATCR ==="
14echo "Source: ${SOURCE_REGISTRY}"
15echo "Target: ${TARGET_REGISTRY}:${TAG}"
16echo ""
17
18# Tag and push amd64 image
19echo ">>> Tagging and pushing amd64 image..."
20docker tag "${SOURCE_REGISTRY}@${AMD64_DIGEST}" "${TARGET_REGISTRY}:${TAG}-amd64"
21docker push "${TARGET_REGISTRY}:${TAG}-amd64"
22echo ""
23
24# Tag and push arm64 image
25echo ">>> Tagging and pushing arm64 image..."
26docker tag "${SOURCE_REGISTRY}@${ARM64_DIGEST}" "${TARGET_REGISTRY}:${TAG}-arm64"
27docker push "${TARGET_REGISTRY}:${TAG}-arm64"
28echo ""
29
30# Create multi-arch manifest using the pushed tags
31echo ">>> Creating multi-arch manifest..."
32docker manifest create "${TARGET_REGISTRY}:${TAG}" \
33 --amend "${TARGET_REGISTRY}:${TAG}-amd64" \
34 --amend "${TARGET_REGISTRY}:${TAG}-arm64"
35echo ""
36
37# Annotate the manifest with platform information
38echo ">>> Annotating manifest with platform information..."
39docker manifest annotate "${TARGET_REGISTRY}:${TAG}" \
40 "${TARGET_REGISTRY}:${TAG}-amd64" \
41 --os linux --arch amd64
42
43docker manifest annotate "${TARGET_REGISTRY}:${TAG}" \
44 "${TARGET_REGISTRY}:${TAG}-arm64" \
45 --os linux --arch arm64
46echo ""
47
48# Push the manifest list
49echo ">>> Pushing multi-arch manifest..."
50docker manifest push "${TARGET_REGISTRY}:${TAG}"
51echo ""
52
53echo "=== Migration complete! ==="
54echo "You can now pull: docker pull ${TARGET_REGISTRY}:${TAG}"