Create an Alpine 1.9 vserver template: Difference between revisions
(Created page with '= How to create an Alpine 1.9 vserver template = A vserver template is a simple tar archive of a base install. Install base packages into a temporary root {{Cmd|sudo apk add --i...') |
Dubiousjim (talk | contribs) (Category:Virtualization) |
||
Line 13: | Line 13: | ||
Finally remove the temp dir. | Finally remove the temp dir. | ||
{{Cmd|sudo rm -r /tmp/template}} | {{Cmd|sudo rm -r /tmp/template}} | ||
[[Category:Virtualization]] |
Latest revision as of 06:16, 12 March 2012
How to create an Alpine 1.9 vserver template
A vserver template is a simple tar archive of a base install.
Install base packages into a temporary root
sudo apk add --initdb --root /tmp/template --repositories-file /etc/apk/repositories --keys-dir /etc/apk/keys -U alpine-base
Vserver needs at least one process running when it boots up so we manually enable the syslog service in our template.
sudo chroot /tmp/template /sbin/rc-update add syslog boot
Create the archive as /tmp/template.tar.gz
cd /tmp/template && sudo tar -czf /tmp/template.tar.gz *
Finally remove the temp dir.
sudo rm -r /tmp/template