Commit 00eb9f02 authored by CAMPION Sebastien's avatar CAMPION Sebastien

fix user creation bug

parent 62f81afc
FROM jupyterhub/jupyterhub
RUN pip install jupyter==1.0.0
FROM debian:jessie
# install nodejs, utf8 locale, set CDN because default httpredir is unreliable
ENV DEBIAN_FRONTEND noninteractive
RUN REPO= && \
echo "deb $REPO/debian jessie main\ndeb $REPO/debian-security jessie/updates main" > /etc/apt/sources.list && \
apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install wget locales git bzip2 &&\
/usr/sbin/update-locale LANG=C.UTF-8 && \
locale-gen C.UTF-8 && \
apt-get remove -y locales && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# install Python + NodeJS with conda
RUN wget -q -O /tmp/ && \
echo 'd0c7c71cc5659e54ab51f2005a8d96f3 */tmp/' | md5sum -c - && \
bash /tmp/ -f -b -p /opt/conda && \
/opt/conda/bin/conda install --yes -c conda-forge \
python=3.5 sqlalchemy tornado jinja2 traitlets requests pip pycurl \
nodejs configurable-http-proxy && \
/opt/conda/bin/pip install --upgrade pip && \
rm /tmp/
ENV PATH=/opt/conda/bin:$PATH
ADD . /src/jupyterhub
WORKDIR /src/jupyterhub
RUN rm -rf $PWD ~/.cache ~/.npm
RUN conda install notebook
RUN mkdir -p /srv/jupyterhub/
WORKDIR /srv/jupyterhub/
#RUN apt-get update
#RUN apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common
#RUN curl -fsSL | apt-key add -
#RUN add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"
#RUN apt-get update
#RUN apt-get install -y docker-ce
#RUN pip install jupyter==1.0.0
RUN apt-get update && apt-get install -y git nano
RUN pip install
RUN pip install
RUN pip install
RUN jupyter serverextension enable --py nbgitpuller --sys-prefix
RUN apt-get install git
CMD ["jupyterhub", "-f", "/srv/jupyterhub/"]
\ No newline at end of file
RUN conda upgrade notebook
CMD jupyterhub -f /srv/jupyterhub/
\ No newline at end of file
......@@ -76,6 +76,10 @@
# and `data` is the POST form data from the login page.
#c.JupyterHub.authenticator_class = 'jupyterhub.auth.PAMAuthenticator'
#c.JSONWebTokenLocalAuthenticator.add_user_cmd = ['useradd', 'USERNAME', '--disabled-password']
#c.LocalAuthenticator.create_system_users = True
#c.JupyterHub.spawner_class = 'jupyterhub.spawner.LocalProcessSpawner'
c.JupyterHub.authenticator_class = 'jwtauthenticator.jwtauthenticator.JSONWebTokenLocalAuthenticator'
#c.JupyterHub.authenticator_class = 'jwtauthenticator.jwtauthenticator.JSONWebTokenAuthenticator'
# # one of "secret" or "signing_certificate" must be given. If both, then "secret" will be the signing method used.
......@@ -85,9 +89,10 @@ import os
c.JSONWebTokenAuthenticator.signing_certificate = os.environ.get("JUPYTERHUB_JWT_KEY") #/foo/bar/adfs-signature.crt' # The certificate used to sign the incoming JSONWebToken, must be in PEM Format
c.JSONWebTokenAuthenticator.username_claim_field = 'upn' # The claim field contianing the username/sAMAccountNAme/userPrincipalName
c.JSONWebTokenAuthenticator.expected_audience = 'jupyter' # This config option should match the aud field of the JSONWebToken, empty string to disable the validation of this field.
#c.JSONWebLocalTokenAuthenticator.create_system_users = True # This will enable local user creation upon authentication, requires JSONWebTokenLocalAuthenticator
c.JSONWebTokenAuthenticator.param_name = 'bearer' # default value
c.JSONWebTokenLocalAuthenticator.create_system_users = True # This will enable local user creation upon authentication, requires JSONWebTokenLocalAuthenticator
c.LocalAuthenticator.create_system_users = True
c.JSONWebTokenAuthenticator.param_name = 'bearer' # default value
## The base URL of the entire application.
......@@ -317,7 +322,10 @@ c.JupyterHub.log_level = 'DEBUG'
## The class to use for spawning single-user servers.
# Should be a subclass of Spawner.
#c.JupyterHub.spawner_class = 'jupyterhub.spawner.LocalProcessSpawner'
#c.JupyterHub.spawner_class = 'dockerspawner.SystemUserSpawner'
c.JupyterHub.spawner_class = 'jupyterhub.spawner.LocalProcessSpawner'
## Path to SSL certificate file for the public facing interface of the proxy
......@@ -625,7 +633,7 @@ c.JupyterHub.log_level = 'DEBUG'
# respond. Callers of spawner.start will assume that startup has failed if it
# takes longer than this. start should return when the server process is started
# and its location is known.
#c.Spawner.start_timeout = 60
c.Spawner.start_timeout = 300
# LocalProcessSpawner(Spawner) configuration
function _on_load(){
IPython.notebook.kernel.execute("URL = ' + window.location + "'")
return {load_ipython_extension: _on_load };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment