Switch to Node.js 16 from Nodesource as that will be a dependency of Zammad 5.2 soon.

This commit is contained in:
Martin Gruner 2022-05-03 15:21:35 +02:00
parent 8d24441c85
commit a341566510
No known key found for this signature in database
GPG Key ID: 1F24F3A68E149925

View File

@ -3,7 +3,7 @@ set -e
# install dependencies
if [ "$1" = 'builder' ]; then
PACKAGES="build-essential curl git libimlib2-dev libpq-dev nodejs shared-mime-info"
PACKAGES="build-essential curl git libimlib2-dev libpq-dev shared-mime-info"
elif [ "$1" = 'runner' ]; then
PACKAGES="curl libimlib2 libpq5 nginx rsync"
fi
@ -12,6 +12,22 @@ apt-get update
apt-get upgrade -y
# shellcheck disable=SC2086
apt-get install -y --no-install-recommends ${PACKAGES}
if [ "$1" = 'builder' ]; then
# Install Node.js 16 repository from Nodesource
apt-get --no-install-recommends -y install gnupg
KEYRING=/usr/share/keyrings/nodesource.gpg
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee "$KEYRING" >/dev/null
cat - > /etc/apt/sources.list.d/nodesource.list <<NODESOURCE_LIST
deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x buster main
NODESOURCE_LIST
apt-get update
apt-get --no-install-recommends -y install nodejs
npm -g install yarn
fi
# Clean-up
rm -rf /var/lib/apt/lists/*
# install zammad