-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsearcher.Dockerfile
59 lines (45 loc) · 2.68 KB
/
searcher.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
52
53
54
55
56
57
58
59
ARG GRAMINE_IMG_TAG=dcap-595ba4d
FROM ghcr.io/initc3/gramine:${GRAMINE_IMG_TAG}
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED 1
ENV VENV_PATH=/root/.venvs/sting
RUN apt-get update && apt-get install -y python3-venv npm software-properties-common jq
RUN npm install -g npm@7
RUN npm install -g [email protected]
RUN python3.10 -m venv $VENV_PATH
WORKDIR /
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
RUN $VENV_PATH/bin/pip install -r requirements.txt
RUN pip install git+https://github.com/initc3/auditee.git
RUN $VENV_PATH/bin/pip install git+https://github.com/initc3/auditee.git
COPY searcher/src/enclave/lib/ecdsa/account.py /usr/local/lib/python3.10/site-packages/eth_account/account.py
COPY searcher/src/enclave/lib/ecdsa/signing.py /usr/local/lib/python3.10/site-packages/eth_account/_utils/signing.py
COPY searcher/src/enclave/lib/ecdsa/datatypes.py /usr/local/lib/python3.10/site-packages/eth_keys/datatypes.py
COPY searcher/src/enclave/lib/ecdsa/coincurve.py /usr/local/lib/python3.10/site-packages/eth_keys/backends/coincurve.py
COPY searcher/src/enclave/lib/ecdsa/main.py /usr/local/lib/python3.10/site-packages/eth_keys/backends/native/main.py
COPY searcher/src/enclave/lib/ecdsa/ecdsa.py /usr/local/lib/python3.10/site-packages/eth_keys/backends/native/ecdsa.py
COPY searcher/src/enclave/lib/py-evm/headers.py /usr/local/lib/python3.10/site-packages/eth/rlp/headers.py
COPY searcher/src/enclave/lib/ecdsa/account.py $VENV_PATH/lib/python3.10/site-packages/eth_account/account.py
COPY searcher/src/enclave/lib/ecdsa/signing.py $VENV_PATH/lib/python3.10/site-packages/eth_account/_utils/signing.py
COPY searcher/src/enclave/lib/ecdsa/datatypes.py $VENV_PATH/lib/python3.10/site-packages/eth_keys/datatypes.py
COPY searcher/src/enclave/lib/ecdsa/coincurve.py $VENV_PATH/lib/python3.10/site-packages/eth_keys/backends/coincurve.py
COPY searcher/src/enclave/lib/ecdsa/main.py $VENV_PATH/lib/python3.10/site-packages/eth_keys/backends/native/main.py
COPY searcher/src/enclave/lib/ecdsa/ecdsa.py $VENV_PATH/lib/python3.10/site-packages/eth_keys/backends/native/ecdsa.py
COPY searcher/src/enclave/lib/py-evm/headers.py $VENV_PATH/lib/python3.10/site-packages/eth/rlp/headers.py
ARG RA_TYPE=dcap
ENV RA_TYPE=$RA_TYPE
ARG RA_CLIENT_SPID
ENV RA_CLIENT_SPID=$RA_CLIENT_SPID
ARG RA_CLIENT_LINKABLE=0
ENV RA_CLIENT_LINKABLE=$RA_CLIENT_LINKABLE
ARG DEBUG=1
ENV DEBUG=$DEBUG
ARG SGX=0
ENV SGX=$SGX
ADD ./searcher/ /Sting-Flashbots/searcher
WORKDIR /Sting-Flashbots/searcher
RUN mkdir -p input_data output_data enclave_data
WORKDIR /Sting-Flashbots/searcher/src
RUN make SGX=$SGX RA_CLIENT_LINKABLE=$RA_CLIENT_LINKABLE DEBUG=$DEBUG RA_TYPE=$RA_TYPE RA_CLIENT_SPID=$RA_CLIENT_SPID
CMD [ "./run.sh" ]