Add jupyterhub compose file and Dockerfile

This commit is contained in:
Fabian Schmidt 2024-09-23 16:23:42 +02:00
parent 3c54534070
commit dd2d493272
3 changed files with 37 additions and 0 deletions

View File

@ -46,3 +46,7 @@ Nothing to do here
## Searxng
Make volume paths relative
## Jupyterhub
Simple jupyterhub setup. Allows for passwordless login of users set in Dockerfile.

23
jupyterhub/Dockerfile Normal file
View File

@ -0,0 +1,23 @@
FROM quay.io/jupyterhub/jupyterhub:latest
RUN useradd -m fabian
RUN useradd -m amour
RUN passwd -d fabian
RUN passwd -d amour
RUN pip install notebook
WORKDIR /data
RUN echo '#!/bin/sh \n\
\n\
echo "c = get_config()" >> /srv/jupyterhub/jupyterhub_config.py \n\
echo "c.Authenticator.allow_all = True" >> /srv/jupyterhub/jupyterhub_config.py \n\
\n\
exec jupyterhub -f /srv/jupyterhub/jupyterhub_config.py \n\
' >> /data/run.sh
RUN chmod +x /data/run.sh
CMD ["/data/run.sh"]

10
jupyterhub/compose.yaml Normal file
View File

@ -0,0 +1,10 @@
services:
jupyterhub:
build: .
image: jupyterhub
container_name: jupyterhub
volumes:
- ./data:/srv/jupyterhub
ports:
- 8050:8000
restart: always