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

* Create user jovyan with UID=1000 in the default users group in the Dockerfile * Set group ownership of user home and conda to root to avoid 'users' group from host access when mounted * Set stick bit on both paths so root owns subdirs too * Change jovyan UID if NB_UID is specified and is not the default 1000 Contribution (c) Copyright IBM Corp. 2015
16 lines
414 B
Bash
Executable File
16 lines
414 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:$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 supervisord in foreground, PID1
|
|
exec supervisord -n -c /etc/supervisor/supervisord.conf
|