-
Notifications
You must be signed in to change notification settings - Fork 19
/
Dockerfile
69 lines (55 loc) · 1.81 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
ARG NEON_EVM_COMMIT
ARG DOCKERHUB_ORG_NAME
FROM ${DOCKERHUB_ORG_NAME}/evm_loader:${NEON_EVM_COMMIT} AS spl
FROM ${DOCKERHUB_ORG_NAME}/neon_test_invoke_program:develop AS neon_test_invoke_program
FROM ubuntu:20.04
COPY ./requirements.txt /opt
WORKDIR /opt
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
git \
software-properties-common \
openssl \
curl \
parallel \
netcat-openbsd \
ca-certificates \
python3-pip \
python3-venv \
postgresql-client && \
python3 -m venv venv && \
pip3 install --upgrade pip && \
/bin/bash -c "source venv/bin/activate" && \
pip install -r requirements.txt && \
pip3 install py-solc-x && \
python3 -c "import solcx; solcx.install_solc(version='0.7.6')" && \
apt-get remove -y git && \
rm -rf /var/lib/apt/lists/*
COPY --from=spl \
/opt/solana/bin/solana \
/opt/solana/bin/solana-keygen \
/cli/bin/
COPY --from=spl \
/opt/spl-token \
/opt/create-test-accounts.sh \
/opt/neon-cli \
/opt/evm_loader-keypair.json \
/spl/bin/
RUN chmod +x /spl/bin/create-test-accounts.sh
# TODO: rename
COPY --from=spl /opt/neon-api /spl/bin/neon-core-api
COPY --from=spl \
/opt/solidity/ \
/opt/contracts/
COPY --from=neon_test_invoke_program \
/opt/neon_test_invoke_program-keypair.json \
/spl/bin/
COPY proxy/operator-keypairs/id.json /root/.config/solana/
COPY . /opt
ARG PROXY_REVISION
RUN sed -i 's/NEON_PROXY_REVISION_TO_BE_REPLACED/'"$PROXY_REVISION"'/g' /opt/proxy/neon_rpc_api_model/neon_rpc_api_worker.py
ENV PATH /venv/bin:/cli/bin/:/spl/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV CONFIG="devnet"
EXPOSE 9090/tcp
ENTRYPOINT [ "./proxy/run-proxy.sh" ]