-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
43 lines (26 loc) · 1.03 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
#syntax=docker/dockerfile:1.7.0-labs
# SPDX-License-Identifier: GPL-3.0-only
FROM --platform=linux/amd64 ghcr.io/foundry-rs/foundry:latest AS build
RUN apk add --no-cache bash
WORKDIR /app
COPY . .
RUN git config --global --add safe.directory /app
RUN git submodule update --init --recursive
RUN forge build
ENTRYPOINT ["sh", "-c"]
CMD ["echo 'Ready'"]
FROM --platform=linux/amd64 ghcr.io/foundry-rs/foundry:latest AS deployed-contracts
RUN apk add --no-cache jq bash python3-dev build-base
WORKDIR /root
COPY --exclude=/app/.git* --from=build /app .
RUN python3 -m venv safe-ledger/venv && \
source safe-ledger/venv/bin/activate && \
pip install -r safe-ledger/requirements.txt
RUN ./deploy_chain.sh
ENTRYPOINT ["anvil"]
CMD ["--load-state", "anvil-state-ETHEREUM.json", "--chain-id", "31337"]
FROM --platform=linux/amd64 ghcr.io/foundry-rs/foundry:latest AS blockchain-node
COPY --from=deployed-contracts /root/data-static /data-static/
COPY ./entrypoint.sh /root/entrypoint.sh
ENTRYPOINT ["sh", "-c"]
CMD ["/root/entrypoint.sh"]