Skip to content

Commit

Permalink
delete vm apk_cache, not host
Browse files Browse the repository at this point in the history
  • Loading branch information
hpresnall committed Mar 17, 2024
1 parent edeb3ac commit bd4c88b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions alpine-make-vm-image
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,10 @@ if grep -qw "$RESOLVCONF_MARK" etc/resolv.conf 2>/dev/null; then
fi

if [ -n "$apk_cache_dir" ]; then
rm etc/apk/cache >/dev/null 2>&1
rm $apk_cache_dir > /dev/null 2>&1
# remove symlink and dir created by bind mount
rm etc/apk/cache >/dev/null ||:
umount $mount_dir/$apk_cache_dir ||:
rm $mount_dir/$apk_cache_dir ||:
else
rm -Rf var/cache/apk/* ||:
fi
Expand Down

0 comments on commit bd4c88b

Please sign in to comment.