mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-11 20:12:58 +00:00

* Pass $@ args to start-notebook.sh * Set tini as entrypoint, but keep start-notebook.sh as easily overridable CMD * su to jovyan user within start-notebook.sh script Contribution (c) Copyright IBM Corp. 2015
17 lines
396 B
Bash
Executable File
17 lines
396 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Change UID of jovyan to NB_UID if it does not match
|
|
if [ "$NB_UID" != $(id -u jovyan) ] ; then
|
|
usermod -u $NB_UID $NB_USER
|
|
chown -R $NB_UID $CONDA_DIR
|
|
fi
|
|
|
|
# Enable sudo if requested
|
|
if [ ! -z "$GRANT_SUDO" ]; then
|
|
echo "$NB_USER ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/notebook
|
|
fi
|
|
|
|
# Start the notebook server
|
|
exec su $NB_USER -c "env PATH=$PATH jupyter notebook $@"
|
|
|