-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (19 loc) · 933 Bytes
/
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
FROM ubuntu:latest
RUN apt update
RUN apt install -y git curl
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.foundry/bin
WORKDIR /root/
# if behind a proxy, may need to install appropriate certs here
RUN curl -L https://foundry.paradigm.xyz | bash
RUN ~/.foundry/bin/foundryup
RUN git clone -b mvp2-diamond https://github.com/synbionet/fair-exchange.git
WORKDIR /root/fair-exchange
ADD docker_artifacts/solc-0.8.16-linux .
RUN printf "\nsolc = \"/root/synbionet-core/solc-0.8.16-linux\"" >> foundry.toml
RUN forge install
# Runs `forge script` against the anvil chain to set up contracts
ENV INIT_SCRIPTS='forge script script/Deploy.s.sol:AnvilDeployScript --rpc-url http://0.0.0.0:8545 --broadcast --ffi -vvvv'
# Command to start the anvil service
ENV ANVIL_START='anvil --host 0.0.0.0'
# Execute the scripts after the anvil service is started
CMD (sleep 3 && $INIT_SCRIPTS) & $ANVIL_START