Setting up Alpine in a chroot: Difference between revisions

From Alpine Linux
(Created page with "To set up in <pre>$PWD/root</pre>: ARCH=x86 wget 'http://nl.alpine.michaelzhou.net/alpine/edge/main/x86/apk-tools-static-'`wget -o /dev/null -O - 'http://alpinelinux.org/packa...")
 
No edit summary
Line 1: Line 1:
To set up in <pre>$PWD/root</pre>:
To set up in <pre>$PWD/root</pre>:


  ARCH=x86
  <nowiki>ARCH=x86
wget 'http://nl.alpine.michaelzhou.net/alpine/edge/main/x86/apk-tools-static-'`wget -o /dev/null -O - 'http://alpinelinux.org/packages?title_op=%3D&title=apk-tools-static&apk_depends_value_op=contains&apk_depends_value=&name_op=%3D&name='$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'
wget 'http://nl.alpine.michaelzhou.net/alpine/edge/main/x86/apk-tools-static-'`wget -o /dev/null -O - 'http://alpinelinux.org/packages?title_op=%3D&title=apk-tools-static&apk_depends_value_op=contains&apk_depends_value=&name_op=%3D&name='$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
tar zxvf apk-tools-static-*.apk
mkdir ./root
mkdir ./root
./sbin/apk.static --initdb -U --initdb --root root --arch $ARCH --repository http://nl.alpine.michaelzhou.net/alpine/edge/main/ --repository http://nl.alpine.michaelzhou.net/alpine/edge/testing/ add alpine-base
./sbin/apk.static --initdb -U --initdb --root root --arch $ARCH --repository http://nl.alpine.michaelzhou.net/alpine/edge/main/ --repository http://nl.alpine.michaelzhou.net/alpine/edge/testing/ add alpine-base
chroot ./root sh -l
chroot ./root sh -l</nowiki>

Revision as of 07:51, 30 May 2011

To set up in

$PWD/root

:

ARCH=x86
wget 'http://nl.alpine.michaelzhou.net/alpine/edge/main/x86/apk-tools-static-'`wget -o /dev/null -O - 'http://alpinelinux.org/packages?title_op=%3D&title=apk-tools-static&apk_depends_value_op=contains&apk_depends_value=&name_op=%3D&name='$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 --initdb --root root --arch $ARCH --repository http://nl.alpine.michaelzhou.net/alpine/edge/main/ --repository http://nl.alpine.michaelzhou.net/alpine/edge/testing/ add alpine-base
chroot ./root sh -l