forked from realworldocaml/book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (25 loc) · 857 Bytes
/
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
FROM ocaml/opam2:ubuntu-18.04
RUN sudo apt-get update && sudo apt-get -y install python-pygments tzdata
ENV OPAMYES=1
WORKDIR /home/opam/src
# update opam
RUN opam switch 4.10
RUN git -C /home/opam/opam-repository pull origin master && opam update -uy
# install non-OCaml dependencies
COPY Makefile /home/opam/src/.
COPY rwo.opam /home/opam/src/.
RUN opam pin add -n rwo . && opam depext -y rwo
RUN opam install dune=2.5.1
#install pandoc
WORKDIR /tmp
RUN curl -OL https://github.com/jgm/pandoc/releases/download/2.9/pandoc-2.9-1-amd64.deb && sudo dpkg -i pandoc-2.9-1-amd64.deb
WORKDIR /home/opam/src
#install pdflatex
WORKDIR /tmp
RUN sudo apt-get update && sudo apt-get -y install texlive-full
WORKDIR /home/opam/src
# compile the project
COPY . /home/opam/src/
RUN sudo chown -R opam /home/opam/src
RUN opam exec -- make
RUN opam exec -- make test