forked from jimboid/biosim-jupyterhub-base
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
64 lines (53 loc) · 1.6 KB
/
Dockerfile
File metadata and controls
64 lines (53 loc) · 1.6 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
56
57
58
59
60
61
62
63
64
# Start with JupyterHub image.
FROM quay.io/jupyter/base-notebook:82d322f00937
LABEL maintainer="James Gebbie-Rayet <james.gebbie@stfc.ac.uk>"
LABEL org.opencontainers.image.source=https://github.com/ccpbiosim/jupyterhub-base
LABEL org.opencontainers.image.description="A base container image derived from jupyterhub base containers with some extra utilities installed."
LABEL org.opencontainers.image.licenses=MIT
# Root to install "rooty" things.
USER root
# Update the OS and install software dependencies
# needing root.
RUN apt-get update && apt-get -yq dist-upgrade \
&& apt-get install -yq --no-install-recommends \
bc \
bison \
build-essential \
bzip2 \
cmake \
curl \
flex \
gfortran \
git \
libz-dev \
libbz2-dev \
make \
nano \
openssh-client \
patch \
rsync \
sed \
tcsh \
unzip \
vim \
wget \
xorg-dev \
xz-utils \
zlib1g-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Modified index for matomo metrics.
#COPY --chown=1000:100 index.html /opt/conda/share/jupyter/lab/static/index.html
COPY --chown=1000:100 matomo-js.txt /tmp
RUN sed -e '/<\/body><\/html>/ {' -e 'r /tmp/matomo-js.txt' -e 'd' -e '}' -i /opt/conda/share/jupyter/lab/static/index.html
# Switch to jovyan user.
USER $NB_USER
WORKDIR $HOME
# Add authenticator
RUN pip install jupyterhub-tmpauthenticator
# Remove work directory as it not required.
RUN rm -r $HOME/work
# Change the loooong default terminal string
RUN echo 'export PS1="\u:\W\$ "' >> /home/jovyan/.bashrc
# Always finish with non-root user as a precaution.
USER $NB_USER