Files
dev-env/scripts/jupyter-container
T
2026-08-19 14:07:08 +02:00

28 lines
549 B
Bash
Executable File

#!/bin/sh
name=$([[ $1 ]] && echo $1 || echo "jupyter")
mount=$([[ $2 ]] && echo $2 || echo "$HOME/projects/")
read -p "Port to use for the jupyter notebook (replace 8888 with that) (default = 8888) " port
if [[ $port == "" ]]; then
port=8888
fi
echo "
=> Mounting folder to /home/jovyan/work (in container)
=> Starting container
"
userid=$(id -u)
usergroup=$(id -g)
docker run \
-v $mount:/home/jovyan/work \
--name $name \
-p $port:8888 \
-u $userid:$usergroup \
-e DOCKER_STACKS_JUPYTER_CMD=notebook \
quay.io/jupyter/base-notebook