Files
docker-stacks/minimal-notebook/start-notebook.sh
Carl Osterwisch 30932a3b12 Revert to using supervisord to launch notebook
Used to relaunch notebook and collect logging data.
2015-08-28 23:39:08 -04:00

17 lines
457 B
Bash
Executable File

#!/bin/bash
# Create non-root NB_USER, member of group "users"
useradd -m -s /bin/bash -u ${NB_UID:-1000} -G users $NB_USER
# Allow "users" group to update conda root env
chown -R root.users $CONDA_DIR
chmod -R g+w $CONDA_DIR
# Enable sudo if requested
if [ ! -z "$GRANT_SUDO" ]; then
echo "$NB_USER ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/notebook
fi
# Start supervisord in foreground, PID1
exec supervisord -n -c /etc/supervisor/supervisord.conf