Setting up Alpine in a chroot

From Alpine Linux
Revision as of 07:35, 3 June 2011 by Jbilyk (talk | contribs) (replace fancy wget with apk fetch and include list of official repos)
Jump to: navigation, search

To set up in ./root:

apk fetch apk-tools-static -o ./
tar zxvf apk-tools-static-*.apk
mkdir ./root
./sbin/apk.static --initdb -U --root root --arch $ARCH --repository --repository add alpine-base
echo unset HISTFILE >>./root/etc/profile
chroot ./root sh -l

For a list of available repositories, see

echo 'nameserver' >/etc/resolv.conf
echo '' >/etc/apk/repositories
echo '' >>/etc/apk/repositories
apk update