-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
51 lines (40 loc) · 1.99 KB
/
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
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
# syntax=docker/dockerfile:1
FROM ubuntu:20.04
ENV BASE=/home/wasp
LABEL org.opencontainers.image.source https://github.com/wasp-platform/wasp-private
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
sudo ranger vim make llvm clang lld opam wabt libgmp-dev python3-pip \
git npm curl lcov clang-tidy gcc-multilib autoconf \
&& useradd -m wasp \
&& echo wasp:wasp | chpasswd \
&& cp /etc/sudoers /etc/sudoers.bak \
&& echo 'wasp ALL=(root) NOPASSWD: ALL' >> /etc/sudoers
COPY --chown=wasp:wasp . /home/wasp/
USER wasp
WORKDIR /home/wasp
# Install opam
RUN opam init -y --disable-sandboxing \
&& eval $(opam env) \
&& opam switch create 4.14.1 \
&& eval $(opam env) \
&& echo 'test -r /home/wasp/.opam/opam-init/init.sh && . /home/wasp/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true' >> /home/wasp/.bashrc
# Instal required OCaml packages
RUN cd "${BASE}" && opam install -y . ./encoding/encoding.opam --deps-only
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/wasp/.opam/default/lib/z3/"
# wasm-ld -> wasm-ld-10
RUN sudo ln -sf /usr/bin/wasm-ld-10 /usr/bin/wasm-ld
# Build WASP and libc
RUN eval $(opam env) && cd "${BASE}" \
&& dune build && dune install \
&& make -C "share/libc"
# Get test suites
RUN git clone https://github.com/wasp-platform/Collections-C.git "${BASE}/Collections-C"
RUN git clone https://github.com/wasp-platform/Test-Comp.git "${BASE}/Test-Comp"
# RUN git clone https://gitlab.com/sosy-lab/software/test-suite-validator.git "${BASE}/test-suite-validator"
# RUN git clone https://github.com/wasp-platform/aws-cryptosdk-c.git "${BASE}/aws-encryption-sdk"
# Gillian
#RUN git clone https://github.com/GillianPlatform/Gillian.git "${BASE}/Gillian"
#RUN git clone https://github.com/GillianPlatform/collections-c-for-gillian.git "${BASE}/collections-c-for-gillian"
#RUN sudo npm install -g esy@0.6.6 --unsafe-perm && \
# cd ${BASE}/Gillian && git checkout 2cb5f8d73baf7f7a811b0be6044d533a62c3f50 && \
# esy install && esy