Docker: Set explicit PATH in dist scripts #2125

This commit is contained in:
Michael Mayer
2022-03-23 08:16:01 +01:00
parent ea3a6e6e0a
commit 357995556f
16 changed files with 107 additions and 79 deletions

View File

@@ -1,5 +1,7 @@
#!/bin/bash
PATH="/usr/local/sbin/:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/scripts"
# abort if not executed as root
if [[ $(id -u) != "0" ]]; then
echo "Usage: run ${0##*/} as root" 1>&2
@@ -12,8 +14,8 @@ SETUP_URL="https://deb.nodesource.com/setup_16.x"
echo "Installing NodeJS and NPM from \"$SETUP_URL\"..."
/usr/bin/curl -sL $SETUP_URL | /bin/bash -
/usr/bin/apt-get update && /usr/bin/apt-get -qq install nodejs
curl -sL $SETUP_URL | bash -
apt-get update && apt-get -qq install nodejs
npm install --unsafe-perm=true --allow-root -g npm testcafe
npm config set cache ~/.cache/npm