No longer need the local registry

This commit is contained in:
2026-03-24 22:26:54 +08:00
parent 81d192d577
commit aad4edd194
7 changed files with 68 additions and 35 deletions

View File

@@ -12,6 +12,7 @@ cp -a "${REGISTRY_DATA_DIR}/." "${ROOTFS}/var/lib/registry/"
mkdir -p "$ROOTFS/var/cache/apk"
mkdir -p "$ROOTFS/var/cache/k8s-images"
mkdir -p "$ROOTFS/build"
mount --bind /var/cache/apk "$ROOTFS/var/cache/apk"
mount --bind /var/cache/k8s-images "$ROOTFS/var/cache/k8s-images"
mount --bind /dev "$ROOTFS/dev"
@@ -22,7 +23,6 @@ mount --bind /run "$ROOTFS/run"
cp /usr/bin/qemu-aarch64-static "$ROOTFS/usr/bin/"
cp /etc/resolv.conf "$ROOTFS/etc/resolv.conf"
cp /build/crio.tar.gz "$ROOTFS/build/"
cp /build/registry.tar.gz "$ROOTFS/build/"
cp -r /build/rootfs/* "$ROOTFS/"
chroot "$ROOTFS" /bin/sh -c "ln -s /var/cache/apk /etc/apk/cache"
@@ -32,6 +32,12 @@ cp "/install-packages.sh" "$ROOTFS/install-packages.sh"
chroot "$ROOTFS" /bin/bash /install-packages.sh || exit 1
rm "$ROOTFS/install-packages.sh"
/merge-rootfs.sh "/build/rootfs-extra" "$ROOTFS"
cp "/configure-system.sh" "$ROOTFS/configure-system.sh"
chroot "$ROOTFS" /bin/bash /configure-system.sh || exit 1
rm "$ROOTFS/configure-system.sh"
umount "$ROOTFS/var/cache/apk"
umount "$ROOTFS/var/cache/k8s-images"
umount "$ROOTFS/dev"
@@ -41,10 +47,8 @@ umount "$ROOTFS/run"
rm -r "$ROOTFS/build"
/merge-rootfs.sh "/build/rootfs-extra" "$ROOTFS"
### Begin making full disk image for the device
echo "=========================== RootFS "$( du -sh "$ROOTFS/" )
echo "##################################################### Packaging RootFS "$( du -sh "$ROOTFS/" )
IMG=output.img
SIZE=1536MB
@@ -78,5 +82,5 @@ umount /mnt/img-root
losetup -d "$LOOP"
echo "GZipping the image"
echo "##################################################### Compressing Image"
gzip "/build/$IMG"