From d247356293e7ea4cfd9c0862632e983c0767bb7e Mon Sep 17 00:00:00 2001 From: Lee Briggs Date: Mon, 11 May 2020 17:27:30 -0700 Subject: [PATCH] Optimtize installs --- scripts/install-dotnet.sh | 2 +- scripts/install-node.sh | 2 +- scripts/install-packages.sh | 4 ++++ scripts/install-python.sh | 8 ++++---- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/install-dotnet.sh b/scripts/install-dotnet.sh index 8fac539..86ddbb5 100755 --- a/scripts/install-dotnet.sh +++ b/scripts/install-dotnet.sh @@ -19,6 +19,6 @@ rm packages-microsoft-prod.deb apt-get update -apt-get install -y \ +apt-get install --no-install-recommends -y \ "dotnet-sdk-${DOTNET_SDK_VERSION}" \ "aspnetcore-runtime-${DOTNET_SDK_VERSION}" diff --git a/scripts/install-node.sh b/scripts/install-node.sh index f7a4321..55319c3 100755 --- a/scripts/install-node.sh +++ b/scripts/install-node.sh @@ -21,6 +21,6 @@ echo "deb https://deb.nodesource.com/${NODE_REPO} ${NODE_DISTRO} main" > /etc/ap echo "deb-src https://deb.nodesource.com/${NODE_REPO} ${NODE_DISTRO} main" >> /etc/apt/sources.list.d/nodesource.list apt-get update -apt-get install -y nodejs +apt-get install -y nodejs --no-install-recommends curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version "${YARN_VERSION}" diff --git a/scripts/install-packages.sh b/scripts/install-packages.sh index f08f810..8846d02 100755 --- a/scripts/install-packages.sh +++ b/scripts/install-packages.sh @@ -4,6 +4,10 @@ set -o errexit set -o pipefail set -o xtrace +# Reduce apt deps +echo 'APT::Install-Recommends "0";' >> /etc/apt/apt.conf +echo 'APT::Install-Suggests "0";' >> /etc/apt/apt.conf + SCRIPT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" #shellcheck source=utils.sh source "${SCRIPT_ROOT}/utils.sh" diff --git a/scripts/install-python.sh b/scripts/install-python.sh index 0ae7ee4..3410bb7 100755 --- a/scripts/install-python.sh +++ b/scripts/install-python.sh @@ -17,10 +17,10 @@ ensureSet "${TWINE_VERSION}" "TWINE_VERSION" || exit 1 export DEBIAN_FRONTEND=noninteractive apt-get update -apt-get install -y "python${PYTHON_VERSION}" python3-pip +apt-get install -y "python${PYTHON_VERSION}" python3-pip python3-setuptools --no-install-recommends update-alternatives --install /usr/bin/python3 python3 "/usr/bin/python${PYTHON_VERSION}" 1 python3 --version -pip3 install --user "pipenv==${PIPENV_VERSION}" -pip3 install --user "awscli==${AWSCLI_VERSION}" -pip3 install --user "wheel==${WHEEL_VERSION}" "twine==${TWINE_VERSION}" +pip3 install --no-cache --user "pipenv==${PIPENV_VERSION}" +pip3 install --no-cache --user "awscli==${AWSCLI_VERSION}" +pip3 install --no-cache --user "wheel==${WHEEL_VERSION}" "twine==${TWINE_VERSION}"