mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-13 13:03:01 +00:00
63 lines
2.1 KiB
Docker
63 lines
2.1 KiB
Docker
# An incomplete base Docker image for running JupyterHub
|
|
#
|
|
# Add your configuration to create a complete derivative Docker image.
|
|
#
|
|
# Include your configuration settings by starting with one of two options:
|
|
#
|
|
# Option 1:
|
|
#
|
|
# FROM jupyterhub/jupyterhub:latest
|
|
#
|
|
# And put your configuration file jupyterhub_config.py in /srv/jupyterhub/jupyterhub_config.py.
|
|
#
|
|
# Option 2:
|
|
#
|
|
# Or you can create your jupyterhub config and database on the host machine, and mount it with:
|
|
#
|
|
# docker run -v $PWD:/srv/jupyterhub -t jupyterhub/jupyterhub
|
|
#
|
|
# NOTE
|
|
# If you base on jupyterhub/jupyterhub-onbuild
|
|
# your jupyterhub_config.py will be added automatically
|
|
# from your docker directory.
|
|
|
|
FROM debian:jessie
|
|
MAINTAINER Jupyter Project <jupyter@googlegroups.com>
|
|
|
|
# install nodejs, utf8 locale, set CDN because default httpredir is unreliable
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
RUN REPO=http://cdn-fastly.deb.debian.org && \
|
|
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/*
|
|
ENV LANG C.UTF-8
|
|
|
|
# install Python + NodeJS with conda
|
|
RUN wget -q https://repo.continuum.io/miniconda/Miniconda3-4.2.12-Linux-x86_64.sh -O /tmp/miniconda.sh && \
|
|
echo 'd0c7c71cc5659e54ab51f2005a8d96f3 */tmp/miniconda.sh' | md5sum -c - && \
|
|
bash /tmp/miniconda.sh -f -b -p /opt/conda && \
|
|
/opt/conda/bin/conda install --yes -c conda-forge python=3.5 sqlalchemy tornado jinja2 traitlets requests pip nodejs configurable-http-proxy && \
|
|
/opt/conda/bin/pip install --upgrade pip && \
|
|
rm /tmp/miniconda.sh
|
|
ENV PATH=/opt/conda/bin:$PATH
|
|
|
|
ADD . /src/jupyterhub
|
|
WORKDIR /src/jupyterhub
|
|
|
|
RUN python setup.py js && pip install . && \
|
|
rm -rf $PWD ~/.cache ~/.npm
|
|
|
|
RUN mkdir -p /srv/jupyterhub/
|
|
WORKDIR /srv/jupyterhub/
|
|
EXPOSE 8000
|
|
|
|
LABEL org.jupyter.service="jupyterhub"
|
|
|
|
CMD ["jupyterhub"]
|