Skip to content

Commit 9986217

Browse files
feat(stability): install Alpine deps without cache to reduce memory (#1863)
1 parent 8b1aff1 commit 9986217

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

nodebuilder

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ ensure_curl_dependency()
477477
log_info 'Ensuring curl depencency.'
478478
case "${TARGET_OPERATING_SYSTEM}" in
479479
alpine)
480-
sudo apk --quiet add curl
480+
sudo apk --quiet add --no-cache curl
481481
;;
482482
debian | ubuntu)
483483
sudo apt-get install -y curl > /dev/null
@@ -513,7 +513,7 @@ ensure_curl_dependency()
513513
;;
514514
*)
515515
if command -v apk > /dev/null; then
516-
sudo apk --quiet add curl
516+
sudo apk --quiet add --no-cache curl
517517
elif command -v apt-get > /dev/null; then
518518
sudo apt-get -qq install -y curl > /dev/null
519519
elif command -v dnf > /dev/null; then
@@ -543,7 +543,7 @@ ensure_sudo_dependency()
543543
log_info 'Ensuring sudo depencency.'
544544
case "${TARGET_OPERATING_SYSTEM}" in
545545
alpine)
546-
apk --quiet add sudo
546+
apk --quiet add --no-cache sudo
547547
;;
548548
debian | ubuntu)
549549
apt-get install -y sudo > /dev/null
@@ -577,7 +577,7 @@ ensure_sudo_dependency()
577577
;;
578578
*)
579579
if command -v apk > /dev/null; then
580-
apk --quiet add sudo
580+
apk --quiet add --no-cache sudo
581581
elif command -v apt-get > /dev/null; then
582582
apt-get -qq install -y sudo > /dev/null
583583
elif command -v dnf > /dev/null; then
@@ -605,7 +605,7 @@ ensure_xargs_dependency()
605605
log_info 'Ensuring xargs depencency.'
606606
case "${TARGET_OPERATING_SYSTEM}" in
607607
alpine)
608-
sudo apk --quiet add findutils
608+
sudo apk --quiet add --no-cache findutils
609609
;;
610610
debian | ubuntu)
611611
apt-get install -y findutils > /dev/null
@@ -638,7 +638,7 @@ ensure_xargs_dependency()
638638
;;
639639
*)
640640
if command -v apk > /dev/null; then
641-
sudo apk --quiet add findutils
641+
sudo apk --quiet add --no-cache findutils
642642
elif command -v apt-get > /dev/null; then
643643
apt-get -qq install -y findutils > /dev/null
644644
elif command -v dnf > /dev/null; then
@@ -793,7 +793,7 @@ install_build_dependencies_apk()
793793
dependencies=$(torsocks curl --fail --silent --show-error --location --retry 2 "${BUILD_DEPENDENCIES_URL}") ||
794794
dependencies=$(curl --fail --silent --show-error --location --retry 5 "${BUILD_DEPENDENCIES_URL}")
795795
[ -z "${dependencies:-}" ] && throw_error "The list of dependencies is empty."
796-
printf '%s\n' "${dependencies}" | xargs apk --quiet add |
796+
printf '%s\n' "${dependencies}" | xargs apk --quiet add --no-cache |
797797
grep -v 'ICU with non-English locales' -A2 -B1 || true
798798
}
799799

@@ -1028,7 +1028,7 @@ install_runtime_dependencies_apk()
10281028
dependencies=$(torsocks curl --fail --silent --show-error --location --retry 2 "${RUNTIME_DEPENDENCIES_URL}") ||
10291029
dependencies=$(curl --fail --silent --show-error --location --retry 5 "${RUNTIME_DEPENDENCIES_URL}")
10301030
[ -z "${dependencies:-}" ] && throw_error 'The list of dependencies is empty.'
1031-
printf '%s\n' "${dependencies}" | xargs sudo apk --quiet add
1031+
printf '%s\n' "${dependencies}" | xargs sudo apk --quiet add --no-cache
10321032
}
10331033

10341034
install_runtime_dependencies_aptget()

0 commit comments

Comments
 (0)