-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (31 loc) · 1.44 KB
/
Dockerfile
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
FROM lmoresi/unimelb-debian-base:v1.03
ENV VERSION=1.03
## ============================================================
## base file has all the labour intensive stuff in it.
## ============================================================
# Change the echo statement to break the cache if the git clone needs refreshing.
## This should be an ADD or COPY
ADD NotebookServer /uom_course/NotebookServer
ADD CourseContent /uom_course/CourseContent
ADD install-server.sh /uom_course/install-server.sh
RUN /uom_course/install-server.sh
## Jekyll Sitebuilder - install gems then build
RUN cd /uom_course/NotebookServer && bundle install && _scripts/docker-site-builder
# Make a scratch directory available to connect to the host machine.
VOLUME /uom_course/NotebookServer/_site/Content/Notebooks/external
# Create a non-privileged user to run the notebooks
RUN useradd --create-home --home-dir /home/serpentine --shell /bin/bash --user-group serpentine
RUN chown -R serpentine:serpentine /uom_course
# skip if you need to change things in the live container
USER serpentine
ENV HOME=/uom_course
ENV SHELL=/bin/bash
ENV USER=serpentine
WORKDIR $HOME
# Launch the notebook server from the Notebook directory
# The file_to_run option actually does nothing with the no-browser option ...
# but perhaps there is something else that would do this.
WORKDIR /uom_course/
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/tini", "--"]
CMD NotebookServer/_scripts/docker-runservers