Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
72 lines (58 loc) · 2.94 KB
/
Copy pathDockerfile
File metadata and controls
72 lines (58 loc) · 2.94 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM ubuntu:26.04
# Set to noninteractive mode
ARG DEBIAN_FRONTEND=noninteractive
################################################################################
# Basic dependencies
################################################################################
RUN apt-get update && apt-get install build-essential cmake iverilog tk expect-dev git python3 python3-pip python3-venv wget unzip verilator -y
RUN apt install python3-pyelftools
# Install toolchain
COPY install-ti-gcc.sh .
RUN ./install-ti-gcc.sh && rm install-ti-gcc.sh
ENV PATH="$PATH:/msp430-gcc/bin"
# Install
################################################################################
# Install dependencies for the software mitigation framework
################################################################################
RUN python3 -m venv openipe_venv
COPY sdk/requirements.txt .
RUN ./openipe_venv/bin/pip install -r requirements.txt && rm requirements.txt
ENV PATH="/openipe_venv/bin:$PATH"
################################################################################
# Install the Pandora tool
################################################################################
WORKDIR /pandora
RUN git clone https://github.com/pandora-tee/pandora .
RUN git clone https://github.com/angr/angr-platforms
RUN python3 -m venv venv
RUN ./venv/bin/pip install -r requirements.txt
RUN cd angr-platforms && ../venv/bin/pip install .
################################################################################
# Copy scripts
################################################################################
WORKDIR /openipe
COPY scripts/* ./scripts/
RUN chmod +x scripts/*.sh
################################################################################
# Display a welcome message for interactive sessions
################################################################################
RUN echo '[ ! -z "$TERM" -a -r /etc/motd ] && cat /etc/motd' \
>> /etc/bash.bashrc ; echo "\
@@ @@@@@@@ @@@@@@@@@@ \n\
@@ @ @@ @ \n\
@@@@@ @@@@@ @@@@@ @ @@@@ @@ @ @ @ \n\
@@ @ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@@@@@@ \n\
@@@@ @ @ @@ @@ @ @ @ @@ @@ @@@@@@@ @ \n\
@@ @ @@ @ @@ @@ @ @ @@ @@ @ @ \n\
@@ @ @@ @@ @@@ @@ @@ @ @@ @@ @ @ \n\
@@@ @@@ @@ @@@@ @@@@@ @ @@ @@ @ @@@@@@@@@@ \n\
@ @ @@ \n\
@ @@ \n\
\n\
\n\
`lsb_release -d`\n\n\
To get started, see <https://github.com/martonbognar/openipe>,\n\
or have a look at the example programs under <app/ipe-hello/>.\n\
\n"\
> /etc/motd
CMD ["/bin/bash"]