-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
26 lines (22 loc) · 833 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM debian:10 as build
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get -y dist-upgrade
RUN apt-get -y install apt-transport-https curl gnupg wget
RUN update-ca-certificates
ARG OCAML=4.08.1
ENV OPAMYES=1
RUN apt-get -y install \
bzip2 g++ git make m4 pkg-config rsync unzip xz-utils mercurial darcs
RUN curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh \
| sed 's/read BINDIR/BINDIR=\/usr\/local\/bin/g' | bash
RUN opam init --compiler=${OCAML} --auto-setup --disable-sandboxing
RUN eval $(opam env) && opam install mirage mirage-unix opam-depext
ADD ./ /src
WORKDIR /src
RUN eval $(opam env) && mirage configure -t unix
RUN eval $(opam env) && make depend
RUN eval $(opam env) && make
FROM debian:10 as deploy
COPY --from=build /src/_build/main.native /bin/hello
ENTRYPOINT /bin/hello