-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.jupyterhub
50 lines (41 loc) · 1.52 KB
/
Dockerfile.jupyterhub
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
ARG JUPYTERHUB_VERSION
FROM jupyterhub/jupyterhub:master
# Configure environment
ENV CONDA_DIR /opt/conda/
ENV PATH ${CONDA_DIR}/bin:${PATH}
ENV SHELL /bin/bash
ENV PYIRON_USER pyiron
ENV PYIRON_UID 1000
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV HOME /home/${PYIRON_USER}
# Configure Miniconda
ENV MINICONDA_VER 4.8.2
ENV MINICONDA Miniconda3-py37_${MINICONDA_VER}-Linux-x86_64.sh
ENV MINICONDA_URL https://repo.continuum.io/miniconda/${MINICONDA}
ENV MINICONDA_MD5_SUM 87e77f097f6ebb5127c77662dfc3165e
USER root
RUN mkdir -p ${CONDA_DIR} \
&& curl -L ${MINICONDA_URL} -o miniconda.sh \
&& echo "${MINICONDA_MD5_SUM} miniconda.sh" | md5sum -c - \
&& ${SHELL} miniconda.sh -f -b -p ${CONDA_DIR} \
&& rm miniconda.sh \
&& ${CONDA_DIR}/bin/conda install --yes conda==${MINICONDA_VER}
# Install dockerspawner, oauth, postgres
RUN /opt/conda/bin/conda install -yq psycopg2 && \
/opt/conda/bin/conda clean -tipsy && \
/opt/conda/bin/pip install --no-cache-dir \
oauthenticator \
dockerspawner
# Copy TLS certificate and key
ENV SSL_CERT /srv/jupyterhub/secrets/jupyterhub.crt
ENV SSL_KEY /srv/jupyterhub/secrets/jupyterhub.key
COPY ./secrets/*.crt $SSL_CERT
COPY ./secrets/*.key $SSL_KEY
RUN chmod 700 /srv/jupyterhub/secrets && \
chmod 600 /srv/jupyterhub/secrets/*
COPY ./userlist /srv/jupyterhub/userlist
COPY jupyterhub_config.py /srv/jupyterhub/jupyterhub_config.py