feat: jupyter notebook and webserver port binding
This commit is contained in:
@@ -3,6 +3,12 @@
|
||||
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
|
||||
@@ -11,6 +17,6 @@ echo "
|
||||
docker run \
|
||||
-v $mount:/home/jovyan/work \
|
||||
--name $name \
|
||||
-p 8888:8888 \
|
||||
-p $port:8888 \
|
||||
-e DOCKER_STACKS_JUPYTER_CMD=notebook \
|
||||
quay.io/jupyter/base-notebook
|
||||
|
||||
@@ -3,11 +3,18 @@
|
||||
name=$([[ $1 ]] && echo $1 || echo "webserver")
|
||||
mount=$([[ $2 ]] && echo $2 || echo "$HOME/projects/")
|
||||
|
||||
read -p "Port to use for the webserver (default = 8080) " port
|
||||
|
||||
if [[ $port == "" ]]; then
|
||||
port=8080
|
||||
fi
|
||||
|
||||
echo "
|
||||
=> Starting container
|
||||
=> Starting container with port $port
|
||||
"
|
||||
|
||||
docker run --rm \
|
||||
-v $mount:/var/www/html \
|
||||
-p $port:8080
|
||||
--name $name \
|
||||
erseco/alpine-php-webserver
|
||||
|
||||
Reference in New Issue
Block a user