Docker: Reduce image layers and improve build scripts

This commit is contained in:
Michael Mayer
2022-02-19 15:32:52 +01:00
parent 9b16dcab24
commit 4247066c1b
33 changed files with 700 additions and 702 deletions

20
scripts/dist/install-nodejs.sh vendored Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# abort if the user is not root
if [[ $(id -u) != "0" ]]; then
echo "Usage: run install-nodejs.sh as root" 1>&2
exit 1
fi
set -e
SETUP_URL="https://deb.nodesource.com/setup_16.x"
echo "Installing NodeJS and NPM from \"$SETUP_URL\"..."
curl -sL $SETUP_URL | bash -
apt-get update && apt-get -qq install nodejs
npm install --unsafe-perm=true --allow-root -g npm
npm config set cache ~/.cache/npm
echo "Done."