Difference between revisions of "Setting up Alpine in a chroot"

From Alpine Linux
Jump to: navigation, search
(replace fancy wget with apk fetch and include list of official repos)
(Fix double redirect)
(Tag: Redirect target changed)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
To set up in ./root:
+
#REDIRECT [[Alpine Linux in a chroot]]
 
 
<nowiki>ARCH=x86
 
apk fetch apk-tools-static -o ./
 
tar zxvf apk-tools-static-*.apk
 
mkdir ./root
 
./sbin/apk.static --initdb -U --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
 
echo unset HISTFILE >>./root/etc/profile
 
chroot ./root sh -l</nowiki>
 
 
 
{{{Tip|For a list of available repositories, see http://nl.alpinelinux.org/alpine/MIRRORS.txt}}}
 
<nowiki>echo 'nameserver 8.8.8.8' >/etc/resolv.conf
 
echo 'http://nl.alpine.michaelzhou.net/alpine/edge/main/' >/etc/apk/repositories
 
echo 'http://nl.alpine.michaelzhou.net/alpine/edge/testing/' >>/etc/apk/repositories
 
apk update</nowiki>
 

Latest revision as of 01:08, 2 April 2020