|
|
@@ -97,6 +97,12 @@ $mirror/$alpine_version/community
|
|
|
EOF
|
|
|
}
|
|
|
|
|
|
+umount_vfs_cleanup() {
|
|
|
+ for fs in proc sys dev; do
|
|
|
+ umount "$chroot_dir/$fs"
|
|
|
+ done
|
|
|
+}
|
|
|
+
|
|
|
bind_mount_vfs() {
|
|
|
for fs in proc sys dev; do
|
|
|
mount -o bind "/$fs" "$chroot_dir/$fs"
|
|
|
@@ -111,7 +117,12 @@ install_inside_chroot() {
|
|
|
chmod +x "$inside_deploy_path"
|
|
|
|
|
|
bind_mount_vfs
|
|
|
+ trap umount_vfs_cleanup EXIT
|
|
|
+
|
|
|
chroot "$chroot_dir" /deploy.sh setup
|
|
|
+
|
|
|
+ trap - EXIT
|
|
|
+ umount_vfs_cleanup
|
|
|
}
|
|
|
|
|
|
extra_setup_vim() {
|