| 1 |
# Build on a really old system to avoid glibc symbol version problems. |
| 2 |
FROM ocaml/opam:debian-10-ocaml-4.14 |
| 3 |
RUN sudo apt-get update && sudo apt-get -y install ca-certificates build-essential libglib2.0-dev libgtk-3-dev m4 pkg-config libexpat1-dev unzip gnupg wget --no-install-recommends |
| 4 |
WORKDIR /src |
| 5 |
RUN sudo chown opam /src |
| 6 |
RUN wget https://www.openssl.org/source/openssl-1.1.1q.tar.gz -O openssl.tgz |
| 7 |
RUN tar xf openssl.tgz |
| 8 |
# Install openssl from source without dynamic libraries. This is the easiest way to force it to be linked statically. |
| 9 |
RUN cd openssl-1.1.1q && ./config no-dgram no-dso no-dynamic-engine no-engine no-shared no-tests && make && sudo make install |
| 10 |
RUN sudo ln -sf /usr/bin/opam-2.1 /usr/bin/opam |
| 11 |
RUN opam install yojson xmlm ounit lwt_react cohttp-lwt-unix lwt_ssl obus lablgtk3 lwt_glib sha dune |
| 12 |
COPY --chown=opam . /src/ |
| 13 |
RUN opam exec -- make |
| 14 |
RUN ldd /src/dist/files/0install |
| 15 |
RUN strip /src/dist/files/0install |