fix: Update build dependencies

This commit is contained in:
Carlos Álvaro
2021-03-13 11:37:50 +01:00
parent bbcca74192
commit cc2819ce1a
2 changed files with 8 additions and 5 deletions

View File

@@ -32,7 +32,7 @@ WORKDIR ${SALT_BUILD_DIR}
# hadolint ignore=DL3008 # hadolint ignore=DL3008
RUN apt-get update \ RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \ && DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
sudo ca-certificates apt-transport-https wget locales pkg-config openssh-client \ sudo ca-certificates apt-transport-https wget locales openssh-client \
python${PYTHON_VERSION} python${PYTHON_VERSION}-dev \ python${PYTHON_VERSION} python${PYTHON_VERSION}-dev \
python3-pip python3-setuptools python3-wheel \ python3-pip python3-setuptools python3-wheel \
supervisor logrotate git gettext-base tzdata \ supervisor logrotate git gettext-base tzdata \

View File

@@ -4,15 +4,17 @@ set -e
source "${SALT_BUILD_DIR}/functions.sh" source "${SALT_BUILD_DIR}/functions.sh"
echo "Updating repositories ..." echo "Installing build dependencies ..."
BUILD_DEPENDENCIES=(make gcc g++ cmake pkg-config)
apt-get update apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y "${BUILD_DEPENDENCIES[@]}"
# Install arm build dependencies # Install arm build dependencies
if [[ "$(uname -i)" =~ ^(arm|aarch64) ]]; then if [[ "$(uname -i)" =~ ^(arm|aarch64) ]]; then
echo "Installing arm dependencies ..." echo "Installing arm specific dependencies ..."
DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \ DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
make gcc g++ cmake libzmq3-dev \ libzmq3-dev libhttp-parser-dev libssl-dev libcurl4-openssl-dev
libhttp-parser-dev libssl-dev libcurl4-openssl-dev
fi fi
# Create salt user # Create salt user
@@ -107,5 +109,6 @@ stderr_logfile=${SALT_LOGS_DIR}/supervisor/%(program_name)s.log
EOF EOF
# Purge build dependencies and cleanup apt # Purge build dependencies and cleanup apt
DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove "${BUILD_DEPENDENCIES[@]}"
DEBIAN_FRONTEND=noninteractive apt-get clean --yes DEBIAN_FRONTEND=noninteractive apt-get clean --yes
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*