-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from Ledger-Donjon/nio/container
Add Containerfile
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM docker.io/library/rust:slim-bullseye | ||
|
||
# Install dependencies and Rust toolchains | ||
# Create a symlink for "x86_64-unknown-linux-gnu-gcc" to fix using x86_64-unknown-linux-gnu toolchain. | ||
RUN export DEBIAN_FRONTEND=noninteractive && \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends --no-install-suggests git libgmp-dev gcc g++ opam && \ | ||
apt-get clean && \ | ||
rustup target add thumbv7em-none-eabihf && \ | ||
rustup target add riscv32imac-unknown-none-elf && \ | ||
opam init --disable-sandboxing -y && \ | ||
opam install -y dune dune-site menhir grain_dypgen ocamlgraph zarith toml bitwuzla && \ | ||
echo 'eval $(opam env)' >> /root/.bashrc && \ | ||
ln -s /usr/bin/x86_64-linux-gnu-gcc /usr/local/bin/x86_64-unknown-linux-gnu-gcc | ||
|
||
# Install binsec | ||
COPY unisim.patch /opt/ | ||
|
||
RUN git clone --depth 1 --branch 0.0.8 https://github.com/binsec/unisim_archisec /opt/unisim_archisec && \ | ||
(cd /opt/unisim_archisec && git apply /opt/unisim.patch && eval $(opam env) && dune build @install && dune install) && \ | ||
git clone --depth 1 --branch 0.9.0 https://github.com/binsec/binsec /opt/binsec && \ | ||
(cd /opt/binsec && eval $(opam env) && dune build @install && dune install) | ||
|
||
# Copy cargo-checkct to /src | ||
COPY . /src/ | ||
WORKDIR /src |