aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorMarc Coquand <marcc@fastmail.fr>2023-12-02 09:49:42 -0600
committerMarc Coquand <marcc@fastmail.fr>2023-12-02 09:49:42 -0600
commit69d3f53365568524e18dfb1200a386309e174359 (patch)
tree30e465d36ea03bceb1f4e9b54aadfdb6d7093162 /Dockerfile
downloadwormhole-69d3f53365568524e18dfb1200a386309e174359.tar.gz
wormhole-69d3f53365568524e18dfb1200a386309e174359.tar.bz2
wormhole-69d3f53365568524e18dfb1200a386309e174359.zip
Initial commit
Diffstat (limited to '')
-rw-r--r--Dockerfile22
1 files changed, 22 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..acbd5c3
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,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/server.exe /bin/app
+
+ENTRYPOINT /bin/app