forked from project-everest/everparse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.Linux
55 lines (44 loc) · 1.71 KB
/
Dockerfile.Linux
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# This Dockerfile build a Linux binary package
# Useful to spare users of the hassle of installing
# Everest dependencies
ARG UBUNTU_RELEASE=bionic
FROM ubuntu:$UBUNTU_RELEASE
# Set up the repository for opam 2.x
RUN apt-get update
RUN apt-get --yes --no-install-recommends install software-properties-common dirmngr gpg-agent
RUN add-apt-repository ppa:avsm/ppa
# Install the dependencies of Project Everest
RUN apt-get update
RUN apt-get update
RUN apt-get --yes install --no-install-recommends opam gcc binutils make m4 git time gnupg ca-certificates sudo patch libc6-dev wget
# Create a new user and give them sudo rights
RUN useradd -d /home/test test
RUN echo 'test ALL=NOPASSWD: ALL' >> /etc/sudoers
RUN mkdir /home/test
RUN chown test:test /home/test
USER test
ENV HOME /home/test
WORKDIR $HOME
SHELL ["/bin/bash", "--login", "-c"]
# Install OCaml
ENV OPAMYES 1
RUN opam init --disable-sandboxing --compiler=4.09.1
RUN opam env --set-switch | tee --append .profile .bashrc .bash_profile
# Clone and build Project Everest dependencies
RUN git clone https://github.com/project-everest/everest.git
WORKDIR everest
RUN ./everest --yes opam
RUN ./everest --yes z3
RUN echo export PATH=$HOME/everest/z3/bin:$PATH | tee --append $HOME/.bash_profile $HOME/.profile $HOME/.bashrc
WORKDIR ..
# Add the project files proper
ADD --chown=test . everparse
WORKDIR everparse
# Build the package (skipping proofs)
# this will also compile F* and KReMLin, since we did not fetch them through everest
ARG EVEREST_THREADS=1
# BUILD_ID is used by CI to avoid caching, starting from this point
ARG BUILD_ID=0
RUN echo $BUILD_ID
RUN env OTHERFLAGS="--admit_smt_queries true" make -j $EVEREST_THREADS package-noversion
ENTRYPOINT ["/bin/bash", "--login"]