aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 1db65cf697413964dcc53757c025ad9bed521985 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM ocaml/opam:alpine as build

# Install system dependencies
RUN sudo apk add --update libev-dev openssl-dev
WORKDIR /home/opam

# Install dependencies
ADD wormhole.opam wormhole.opam
RUN opam install . --deps-only 

# Build project
ADD . .
RUN opam exec -- dune build -j 1 --verbose


FROM alpine:3.18.4 as run

RUN apk add --update libev

COPY --from=build /home/opam/_build/default/wormhole /bin/app

ENTRYPOINT /bin/app