Setting up Alpine in a chroot

From Alpine Linux
Revision as of 22:00, 2 June 2011 by Michaelz (talk | contribs)
Jump to: navigation, search

To set up in ./root:

wget ''`wget -o /dev/null -O - ''$ARCH'&name_1_op=%3D&name_1=&name_2_op=%3D&name_2=' | fgrep 'views-field views-field-apk-version' -A1 | tail -n1 | cut -d'<' -f1 | sed 's/ //g'`'.apk'
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
echo 'nameserver' >/etc/resolv.conf
echo '' >/etc/apk/repositories
echo '' >>/etc/apk/repositories
apk update