Use APK cache if available on the host system
This commit is contained in:
parent
149b6a26ee
commit
63a0342a56
1 changed files with 10 additions and 0 deletions
|
@ -447,6 +447,11 @@ else
|
|||
dump_alpine_keys etc/apk/keys/
|
||||
fi
|
||||
|
||||
# Use APK cache if available.
|
||||
if [ -L /etc/apk/cache ]; then
|
||||
ln -s "$(realpath /etc/apk/cache)" etc/apk/cache
|
||||
fi
|
||||
|
||||
_apk add --root . --update-cache --initdb alpine-base
|
||||
prepare_chroot .
|
||||
|
||||
|
@ -493,6 +498,11 @@ if [ "$PACKAGES" ]; then
|
|||
_apk add --root . $PACKAGES
|
||||
fi
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
if [ -L /etc/apk/cache ]; then
|
||||
rm etc/apk/cache >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
if [ "$SCRIPT" ]; then
|
||||
script_name="${SCRIPT##*/}"
|
||||
|
|
Loading…
Reference in a new issue