You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# File taken from https://github.com/microsoft/vscode-dev-containers/blob/master/containers/azure-static-web-apps/.devcontainer/library-scripts/node-debian.sh
8
+
9
+
# Syntax: ./node-debian.sh [directory to install nvm] [node version to install (use "none" to skip)] [non-root user]
10
+
11
+
export NVM_DIR=${1:-"/usr/local/share/nvm"}
12
+
export NODE_VERSION=${2:-"lts/*"}
13
+
USERNAME=${3:-"vscode"}
14
+
UPDATE_RC=${4:-"true"}
15
+
16
+
mkdir -p "/etc/zsh/"
17
+
18
+
set -e
19
+
20
+
if [ "$(id -u)"-ne 0 ];then
21
+
echo -e 'Script must be run a root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
22
+
exit 1
23
+
fi
24
+
25
+
# Treat a user name of "none" or non-existant user as root
26
+
if [ "${USERNAME}"="none" ] ||! id -u ${USERNAME}> /dev/null 2>&1;then
27
+
USERNAME=root
28
+
fi
29
+
30
+
if [ "${NODE_VERSION}"="none" ];then
31
+
export NODE_VERSION=
32
+
fi
33
+
34
+
# Ensure apt is in non-interactive to avoid prompts
35
+
export DEBIAN_FRONTEND=noninteractive
36
+
37
+
# Install curl, apt-transport-https, tar, or gpg if missing
0 commit comments