-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
49 lines (38 loc) · 1.12 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
46
47
48
# Dockerfile
# docker build -t user .
FROM haskell:8.2.2
# Install dependecies needed
RUN apt-get update && apt-get install -y \
curl \
libmagic-dev \
libzmq3-dev \
libpango1.0-dev \
python3-pip \
r-base \
z3
# Install R package ggplot2
RUN R -e "install.packages(c('ggplot2'), repos='http://cran.rstudio.com/')"
# Install NodeJS
RUN curl -sSL https://deb.nodesource.com/setup_8.x | bash && \
apt-get install -y nodejs
# Install Jupyter notebook
RUN pip3 install jupyterlab==0.33.0 && \
jupyter labextension install ihaskell_jupyterlab
# Setup the haskell environment
ENV DG_USER user
ENV DG_UID 1000
ENV DG_HOME /home/${DG_USER}
RUN adduser --disabled-password --gecos "Default user" --uid ${DG_UID} ${DG_USER}
# Set up a working directory for IHaskell
WORKDIR ${DG_HOME}
COPY . .
# Install dependencies for IHaskell
RUN chown -R ${DG_UID} ${DG_HOME}
USER ${DG_UID}
RUN stack build && \
stack install && \
stack exec -- ihaskell install --stack
EXPOSE 8888
# Run the notebook
CMD ["stack", "exec", "jupyter", "notebook"]
# CMD ["stack", "exec", "--", "jupyter", "lab", "--ip", "0.0.0.0"]