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...') |
(No difference)
|
Revision as of 22:16, 3 October 2009
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