forked from ocurrent/opam-repo-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.web
19 lines (18 loc) · 915 Bytes
/
Dockerfile.web
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM ocaml/opam:debian-11-ocaml-4.12 AS build
RUN sudo apt-get update && sudo apt-get install libev-dev capnproto m4 pkg-config libgmp-dev libffi-dev -y --no-install-recommends
RUN cd ~/opam-repository && git pull origin master && git reset --hard 81d2d054a0c2686544e2a651a8154a584dba8403 && opam update
COPY --chown=opam \
ocurrent/current_rpc.opam \
ocurrent/current_ansi.opam \
/src/ocurrent/
WORKDIR /src
RUN opam pin -yn add ./ocurrent
COPY --chown=opam opam-repo-ci-api.opam opam-repo-ci-web.opam /src/
RUN opam install -y --deps-only .
ADD --chown=opam . .
RUN opam config exec -- dune build ./_build/install/default/bin/opam-repo-ci-web
FROM debian:11
RUN apt-get update && apt-get install ca-certificates libev4 dumb-init -y --no-install-recommends
WORKDIR /
ENTRYPOINT ["dumb-init", "/usr/local/bin/opam-repo-ci-web"]
COPY --from=build /src/_build/install/default/bin/opam-repo-ci-web /usr/local/bin/