-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
FROM ocaml/opam:debian-12-ocaml-4.14 | ||
FROM ocaml/opam:debian-12-ocaml-5.2 | ||
RUN sudo apt-get update && sudo apt-get install autoconf automake -y --no-install-recommends | ||
RUN mkdir -p /home/opam/www/mirage | ||
WORKDIR /home/opam/www | ||
RUN sudo ln -f /usr/bin/opam-2.1 /usr/bin/opam | ||
RUN cd ~/opam-repository && git pull origin master && git reset --hard 6e53e4603d4bb696e4fa1cdbde61b156a3f8e01e | ||
RUN cd ~/opam-repository && git pull origin master && git reset --hard 705cfbfe709bba2533a3cd6164b7dab37fca0342 | ||
RUN opam update | ||
RUN opam install 'mirage>=4.5.0' | ||
COPY --chown=opam:root mirage/config.ml /home/opam/www/mirage/ | ||
COPY --chown=opam:root mirageio.opam /home/opam/www/ | ||
ARG TARGET=unix | ||
ARG EXTRA_FLAGS= | ||
RUN opam exec -- mirage configure -f mirage/config.ml -t $TARGET $EXTRA_FLAGS | ||
ARG EXTRA_FLAGS_NO_METRICS=--tls=true --separate-networks | ||
RUN opam pin add -n ocaml-solo5 'https://github.com/shym/ocaml-solo5.git#ocaml-5.2-reb' | ||
RUN opam exec -- mirage configure -f mirage/config.ml -t $TARGET $EXTRA_FLAGS_NO_METRICS | ||
RUN opam exec -- make depend | ||
COPY --chown=opam:root . /home/opam/www | ||
RUN opam exec -- mirage configure -f mirage/config.ml -t $TARGET $EXTRA_FLAGS | ||
RUN opam exec -- mirage configure -f mirage/config.ml -t $TARGET $EXTRA_FLAGS_NO_METRICS | ||
RUN opam exec -- dune build mirage/ --profile release | ||
RUN if [ $TARGET = hvt ]; then sudo cp mirage/dist/www.$TARGET /unikernel.$TARGET; fi |