-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
executable file
·51 lines (39 loc) · 1.63 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
# docker context ls
# docker context use default
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y -q install sudo build-essential rsync wget zip unzip \
&& apt-get -y install --no-install-recommends vim python3 pip git curl nodejs npm ocaml opam \
&& apt-get -y install --no-install-recommends libgmp-dev libmpfr-dev pkg-config m4 wabt \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN pip install prettytable
# we need node17
RUN curl -sL https://deb.nodesource.com/setup_17.x | bash -
RUN apt-get install -y nodejs
# Copy the wasm-call-graphs repo
RUN mkdir -p /home/toughcall
COPY . /home/toughcall
# Wassail - Install from copied directory in tools/wassail
RUN opam init --auto-setup --disable-sandboxing --yes --bare
RUN opam switch create system ocaml-base-compiler.4.14.1
RUN eval $(opam env)
WORKDIR /home/toughcall/tools/wassail
RUN opam install --yes .; exit 0
RUN opam install --yes core_unix
RUN opam install --yes .
RUN make
WORKDIR /
#RUN opam install --yes core_unix wasm.2.0.0
#RUN opam install --yes home/toughcall/tools/wassail
# Twiggy - Install from copied directory in tools/twiggy
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN cargo build --manifest-path=/home/toughcall/tools/twiggy/Cargo.toml --all --exclude twiggy-wasm-api
# MetaDCE - Install Binaryen
RUN apt-get -y install --no-install-recommends binaryen
# WAVM + LLVM - Install llvm-12 for llvm-dis-12 and llvm-as-12 and the WAVM compiler
RUN apt-get -y install --no-install-recommends llvm-12
RUN apt install /home/toughcall/tools/wavm-0.0.0-prerelease-linux.deb
CMD ["bash"]