Unified aarch64 / amd64 image

This commit is contained in:
Ryan Hughes
2025-10-29 22:55:17 -04:00
parent f6cc3f3ea3
commit 78c1ef2658
5 changed files with 183 additions and 60 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# Simplified pacstrap for Docker (doesn't require mounts)
set -e
newroot=$1
shift
pacman_args=("${@:-base}")
[[ -d "$newroot" ]] || { echo "ERROR: $newroot is not a directory"; exit 1; }
echo "==> Creating install root at $newroot"
mkdir -m 0755 -p "$newroot"/var/{cache/pacman/pkg,lib/pacman,log} "$newroot"/{dev,run,etc}
mkdir -m 1777 -p "$newroot"/tmp
mkdir -m 0555 -p "$newroot"/{sys,proc}
echo "==> Installing packages to $newroot"
if ! pacman -r "$newroot" -Sy --noconfirm "${pacman_args[@]}"; then
echo "ERROR: Failed to install packages"
exit 1
fi
echo "==> Installation complete"