aboutsummaryrefslogtreecommitdiff
path: root/src/jupyterlab
diff options
context:
space:
mode:
authorJosh Spicer <joshspicer@github.com>2022-06-03 17:46:25 +0300
committerGitHub <noreply@github.com>2022-06-03 17:46:25 +0300
commitc12a205ab8e195541acfe0cb654b4888e16ea05c (patch)
treea1a45ac7dec9f31fa62972a65414b6d6fd1fd60d /src/jupyterlab
parent283b8e1f8f5dec9e54199c107e772ce56683769e (diff)
Pass options via environment variables (#39)
* up to docker-in-docker converted * first pass at the rest of the features (and bash linting and updated CLI * move shell linter to own file * rename feature.json -> devcontainer-feature.json * continue on error * continue on error in right spot * formatting * fix AZ_VERSION * update python * restore variable name * update linter actions, fix dind/dfd/desktop scripts, add test-scenaerios * add tree because I like tree * glob for shell linter * fix test-scenarios * shell linter * more shell helper
Diffstat (limited to 'src/jupyterlab')
-rw-r--r--src/jupyterlab/devcontainer-feature.json (renamed from src/jupyterlab/feature.json)12
-rw-r--r--src/jupyterlab/install.sh13
2 files changed, 15 insertions, 10 deletions
diff --git a/src/jupyterlab/feature.json b/src/jupyterlab/devcontainer-feature.json
index 86010c3..8546925 100644
--- a/src/jupyterlab/feature.json
+++ b/src/jupyterlab/devcontainer-feature.json
@@ -4,13 +4,19 @@
"options": {
"version": {
"type": "string",
- "proposals": ["latest", "3.6.2"],
+ "proposals": [
+ "latest",
+ "3.6.2"
+ ],
"default": "latest",
"description": "Select or enter a jupyterlab version."
},
- "pythonBinary": {
+ "python_binary": {
"type": "string",
- "proposals": ["python", "/usr/local/python/bin/python"],
+ "proposals": [
+ "python",
+ "/usr/local/python/bin/python"
+ ],
"default": "python",
"description": "Select or enter the python binary path."
}
diff --git a/src/jupyterlab/install.sh b/src/jupyterlab/install.sh
index 4d426a4..f6c30d3 100644
--- a/src/jupyterlab/install.sh
+++ b/src/jupyterlab/install.sh
@@ -6,15 +6,14 @@
#
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/jupyterlab.md
# Maintainer: The VS Code and Codespaces Teams
-#
-# Syntax: ./jupyter-debian.sh
set -ex
-VERSION=${1:-"latest"}
-USERNAME=${2:-"automatic"}
-PYTHON=${3:-"python"}
-ALLOW_ALL_ORIGINS=${4:-""}
+VERSION=${VERSION:-"latest"}
+PYTHON=${PYTHON_BINARY:-"python"}
+
+USERNAME=${USERNAME:-"automatic"}
+ALLOW_ALL_ORIGINS=${ALLOW_ALL_ORIGINS:-""}
if [ "$(id -u)" -ne 0 ]; then
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
@@ -25,7 +24,7 @@ fi
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
- for CURRENT_USER in ${POSSIBLE_USERS[@]}; do
+ for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER}
break