forked from
anil.recoil.org/monopam-myspace
My aggregated monorepo of OCaml code, automaintained
1FROM ocaml/opam:debian-ocaml-5.4
2
3# System dependencies
4RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \
5 autoconf pkg-config libgmp-dev libev-dev libffi-dev libssl-dev \
6 && sudo rm -rf /var/lib/apt/lists/*
7
8# Set up oxcaml switch with ox and alpha repos
9RUN opam update --all \
10 && opam switch create 5.2.0+ox \
11 --repos ox=git+https://github.com/oxcaml/opam-repository.git,alpha=git+https://github.com/kit-ty-kate/opam-alpha-repository.git,default \
12 && eval $(opam env --switch 5.2.0+ox)
13
14# Add Jon's opam overlay repo (local copy until remote is pushed)
15COPY --chown=opam:opam jon-opam-repo /home/opam/jon-opam-repo
16RUN opam repo add --switch 5.2.0+ox jon /home/opam/jon-opam-repo
17
18# Core odoc stack - install odoc first so the git source is cached,
19# avoiding parallel clones of the same repo hitting tangled.sh
20RUN opam install --switch 5.2.0+ox -y odoc
21RUN opam install --switch 5.2.0+ox -y odoc-parser odoc-md odoc-driver sherlodoc
22
23# odoc extensions — installed sequentially to avoid tangled.sh rate limits
24# NOTE: odoc-interactive-extension excluded — depends on x-ocaml -> ocamlformat-lib
25# which conflicts with oxcaml base packages
26RUN opam install --switch 5.2.0+ox -y odoc-admonition-extension
27RUN opam install --switch 5.2.0+ox -y odoc-dot-extension
28RUN opam install --switch 5.2.0+ox -y odoc-mermaid-extension
29RUN opam install --switch 5.2.0+ox -y odoc-msc-extension
30RUN opam install --switch 5.2.0+ox -y odoc-rfc-extension
31RUN opam install --switch 5.2.0+ox -y odoc-scrollycode-extension
32RUN opam install --switch 5.2.0+ox -y odoc-standalone
33RUN opam install --switch 5.2.0+ox -y odoc-docsite
34RUN opam install --switch 5.2.0+ox -y odoc-jons-plugins
35
36# Misc packages
37# NOTE: x-ocaml excluded — ocamlformat-lib conflicts with oxcaml
38RUN opam install --switch 5.2.0+ox -y \
39 mime_printer ppxlib_register code-mirror
40
41# js_top_worker family + merlin-js
42# NOTE: js_top_worker-web excluded — depends on js_of_ocaml-lwt which
43# conflicts with js_of_ocaml.6.0.1+ox
44RUN opam install --switch 5.2.0+ox -y \
45 js_top_worker js_top_worker-bin js_top_worker-client \
46 js_top_worker-rpc js_top_worker-unix \
47 js_top_worker-widget js_top_worker-widget-leaflet \
48 merlin-js
49
50# tessera family — sequential to avoid tangled.org rate limits
51RUN opam install --switch 5.2.0+ox -y tessera-linalg
52RUN opam install --switch 5.2.0+ox -y tessera-npy tessera-geotessera
53RUN opam install --switch 5.2.0+ox -y tessera-viz
54RUN opam install --switch 5.2.0+ox -y tessera-geotessera-jsoo tessera-viz-jsoo
55
56# NOTE: onnxrt excluded — depends on js_of_ocaml-lwt which conflicts with oxcaml
57# RUN opam install --switch 5.2.0+ox -y onnxrt
58
59# NOTE: day10/day10-web excluded — requires ocaml >= 5.3.0, oxcaml is 5.2.0
60# RUN opam install --switch 5.2.0+ox -y day10 day10-web
61
62# Verify
63ENV PATH="/home/opam/.opam/5.2.0+ox/bin:${PATH}"
64RUN odoc --version && odoc_driver --help | head -1 && sherlodoc --version