From 5e17c2f910aff9a17919988b5cf90e5a6b092389 Mon Sep 17 00:00:00 2001 From: Allan Blanchard Date: Sat, 2 Nov 2024 17:54:42 +0100 Subject: [PATCH] Save Dockerfile for the docker image used for verifying code --- code/Dockerfile | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 code/Dockerfile diff --git a/code/Dockerfile b/code/Dockerfile new file mode 100644 index 0000000..37bdb06 --- /dev/null +++ b/code/Dockerfile @@ -0,0 +1,52 @@ +FROM alpine:latest + +RUN apk add \ + bash \ + build-base \ + bzip2 \ + ca-certificates \ + curl \ + diffutils \ + gcc \ + git \ + make \ + opam \ + patch \ + tar \ + unzip \ + wget \ + which \ + z3 + +RUN opam init -c 4.14.2 --disable-sandboxing + +RUN opam install --confirm-level=unsafe-yes \ + dune \ + dune-configurator \ + dune-site \ + alt-ergo \ + coq \ + menhir \ + ocamlgraph \ + unionFind \ + why3 \ + why3-coq \ + yaml \ + yojson \ + zarith \ + ppx_deriving \ + ppx_deriving_yojson \ + ppx_deriving_yaml + +ENV HOME="/root" + +ENV OPAM_SWITCH_PREFIX="$HOME/.opam/4.14.2" +ENV CAML_LD_LIBRARY_PATH="$OPAM_SWITCH_PREFIX/lib/stublibs:$OPAM_SWITCH_PREFIX/lib/ocaml/stublibs:$OPAM_SWITCH_PREFIX/lib/ocaml" +ENV OCAML_TOPLEVEL_PATH="$OPAM_SWITCH_PREFIX/lib/toplevel" +ENV PATH="$OPAM_SWITCH_PREFIX/bin:$PATH" + +RUN wget https://git.frama-c.com/pub/frama-c/-/archive/master/frama-c-master.tar.gz +RUN tar xzf frama-c-master.tar.gz +RUN make PREFIX=$OPAM_SWITCH_PREFIX RELEASE=yes -C frama-c-master install + +RUN why3 config detect