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

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

* Fixed indentation.
This commit is contained in:
Martin Gruner 2022-05-04 17:39:02 +02:00 committed by GitHub
parent 8d24441c85
commit 4799b327d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

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