This is a branch of original script intended for quick Alpine setup on a device with low capabilities.
Tested on a router with AsusWRT-Merlin and Entware
Because Alpine is ideal for running containerized services.
Even though chroot is not a container.
APK_TOOLS_URI
andAPK_TOOLS_SHA256
defaults are set toaarch64
binary.busybox-suid
andmusl-utils
are removed from base install.ALPINE_PACKAGES
are set to empty list.- Shebang is modified to use Entware bash (built-in busybox does not provide
getopts
).
Installation script requires following Entware packages to be installed:
coreutils-id
coreutils-mktemp
(optional)bash
coreutils-sha256sum
List may appear incomplete.
curl
or wget
, chroot
, sed
and other basic commands are provided by AsusWRT-Merlin.
- Download raw script.
chmod +x alpine-chroot-install
./alpine-chroot-install -h
for usage. DefaultCHROOT_DIR
is most likely not where you want to install../alpine-chroot-install -d CHROOT_DIR
.
Warning! Don't rm -rf
the chrooted directory while it has bind-mounted directories inside.
Use the created $CHROOT_DIR/destroy
script.
Warning! Run the destroy
script using its canonical absolute path, otherwise it can miss mounted directories.
Also see the original README.