-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (36 loc) · 1.41 KB
/
Copy pathDockerfile
File metadata and controls
55 lines (36 loc) · 1.41 KB
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
51
52
53
54
55
# The existing docker image should be deployable on binder - we just need
# to copy the content across to the $HOME directory ... see
# https://mybinder.readthedocs.io/en/latest/dockerfile.html#when-should-you-use-a-dockerfile
# for details
# SHA tagging of the publication version
FROM underworldcode/underworld2:2.6.0b
ENV NB_USER jovyan
ENV NB_UID 1000
ENV HOME /home/${NB_USER}
# We have to do some manipulation as the root user to begin with.
USER root
## We can also build the static docs here but
## we need python 3 for some of this - see the mkdocs_build_requirements.txt file for details
## RUN pip install mkdocs \
## mkdocs-material \
## pygments \
## pymdown-extensions
RUN pip install --upgrade jupyter \
jupyter_contrib_nbextensions
RUN jupyter contrib nbextension install --system
WORKDIR /home/jovyan
## These are the build templates etc
ADD content content
ADD scripts scripts
# Trust underworld notebooks
RUN find content/docs/notebooks -name \*.ipynb -print0 | xargs -0 jupyter trust || true
## Set config options
RUN rm -rf .jupyter || true
ADD resources/jupyter-config .jupyter
# Launch the notebook server from the Notebook directory
# but perhaps there is something else that would do this.
RUN chown -R ${NB_UID} ${HOME}
USER jovyan
EXPOSE 8888
ENTRYPOINT ["/usr/local/bin/tini", "--"]
CMD /home/jovyan/scripts/run-jupyter.sh -p 8888