-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaoa-jupyter-hub
27 lines (23 loc) · 1.21 KB
/
aoa-jupyter-hub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
ARG JUPYTERHUB_VERSION=1.5.0
ARG BASE_IMAGE=jupyterhub/jupyterhub:$JUPYTERHUB_VERSION
FROM $BASE_IMAGE
# Install dockerspawner, oauth, postgres, idle-culler, ldap-auth, kubespawner
# NOTE: for ActiveDirectory ldap better use jupyterhub-ldapauthenticator instead of jupyterhub-ldap-authenticator
RUN pip3 install --no-cache-dir --quiet \
oauthenticator==0.8.* \
dockerspawner==0.9.* \
jupyterhub-kubespawner \
psycopg2-binary \
jupyterhub-idle-culler \
jupyterhub-ldap-authenticator
# Generate cookie secret file
RUN openssl rand -hex 32 > /srv/jupyterhub/jupyterhub_cookie_secret && \
chmod 600 /srv/jupyterhub/jupyterhub_cookie_secret
# Create demo users
RUN useradd -M -r -s /bin/false admin && useradd -M -r -s /bin/false developer && useradd -M -r -s /bin/false user && \
echo "admin:admin" | chpasswd && echo "developer:developer" | chpasswd && echo "user:user" | chpasswd
RUN echo "admin admin" >> /srv/jupyterhub/userlist && echo "developer" >> /srv/jupyterhub/userlist && echo "user" >> /srv/jupyterhub/userlist
# Add sample notebooks
ADD ["notebooks/", "/aoa/notebooks/"]