Project

General

Profile

« Previous | Next » 

Revision d10d0cd9

Added by LĂ©lio Brun 11 months ago

Docker files

View differences:

docker/Dockerfile
1
FROM ocaml/opam:debian-10-ocaml-4.11
2

  
3
RUN sudo apt-get update &&\
4
    sudo apt-get install -y cvc4 z3
5

  
6
RUN opam update &&\
7
    opam depext -i\
8
    dune.2.9.1 dune-site menhir zarith ppx_deriving_yojson ocamlgraph alt-ergo frama-c
9

  
10
ENV PATH=$PATH:/home/opam/.opam/4.11/bin
11

  
12
RUN why3 config detect
13

  
14
COPY init.sh $HOME/
15

  
16
CMD ["/bin/bash", "--init-file", "~/init.sh"]
docker/init.sh
1
#!/usr/bin/env bash
2

  
3
cd $HOME/lustrec
4

  
5
echo "Compiling LustreC..."
6
dune build
7
echo "Done."
rundocker.sh
1
#!/usr/bin/env bash
2

  
3
containerId=leliobrun/lustrec-env
4

  
5
command -v docker >/dev/null 2>&1 || { \
6
        echo >&2 "docker is required but could not be found.  Aborting."; \
7
        echo >&2 "To setup Docker: https://docs.docker.com/engine/getstarted/step_one/"; \
8
        exit 1; }
9

  
10
docker run -it --rm --user $(id -u):$(id -g)\
11
    -v $PWD:/home/opam/lustrec $containerId $1

Also available in: Unified diff