forked from pantos-io/ethereum-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (23 loc) · 897 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
31
32
33
34
35
36
37
38
39
#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
WORKDIR /root
COPY --exclude=/app/.git* --from=build /app .
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"]