File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ if [ "$JUPYTER_DISABLE" != "1" ]; then
104104 # Run Jupyter Lab as ubuntu user when possible
105105 JUPYTER_ARGS=" --port=8888 --ip=* --ServerApp.allow_origin=*"
106106 if [ " $( id -u) " -eq 0 ] && id ubuntu & > /dev/null; then
107- sudo -u ubuntu bash -c " JUPYTER_TOKEN=' $ JUPYTER_TOKEN' jupyter lab $JUPYTER_ARGS " &
107+ sudo --preserve-env=PATH, JUPYTER_TOKEN -u ubuntu jupyter lab $JUPYTER_ARGS &
108108 else
109109 if [ " $( id -u) " -eq 0 ]; then
110110 JUPYTER_ARGS=" $JUPYTER_ARGS --allow-root"
131131
132132# Execute the passed arguments (CMD) as ubuntu when possible
133133if [ " $( id -u) " -eq 0 ] && id ubuntu & > /dev/null; then
134- exec sudo -u ubuntu " $@ "
134+ exec sudo --preserve-env=PATH - u ubuntu " $@ "
135135else
136136 exec " $@ "
137137fi
You can’t perform that action at this time.
0 commit comments