-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile.web
24 lines (23 loc) · 1.41 KB
/
Dockerfile.web
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM ocaml/opam:debian-11-ocaml-4.14@sha256:e4ce65485aed7b09b605f39643b46b86b913b54f5304e0dc125d815d18805887 AS build
RUN curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
RUN sudo apt-get update && sudo apt-get install libev-dev capnproto m4 pkg-config libgmp-dev nodejs yarn -y --no-install-recommends
RUN cd ~/opam-repository && git fetch -q origin master && git reset --hard 4d71c85721434d76da9b416c2f1a082c22d45769 && opam update
COPY --chown=opam \
ocurrent/current_rpc.opam \
/src/ocurrent/
WORKDIR /src
RUN opam pin -yn add ./ocurrent
COPY --chown=opam ocaml-multicore-ci-api.opam ocaml-multicore-ci-web.opam /src/
RUN opam install -y --deps-only .
ADD --chown=opam . .
RUN opam config exec -- dune build ./_build/install/default/bin/ocaml-multicore-ci-web
RUN cd /src/web-app && yarn install && yarn build
FROM debian:11
RUN apt-get update && apt-get install libev4 ca-certificates dumb-init -y --no-install-recommends
WORKDIR /
ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/local/bin/ocaml-multicore-ci-web", "--admin-service-uri", "https://multicore.ci.ocamllabs.io:8100/", "--docroot", "/srv"]
EXPOSE 8090/tcp
COPY --from=build /src/_build/install/default/bin/ocaml-multicore-ci-web /usr/local/bin/
COPY --from=build /src/web-app/build/ /srv/