2023-08-03 20:31:16 +00:00
|
|
|
FROM cerc/fixturenet-eth-genesis:local as fnetgen
|
2023-05-26 21:57:15 +00:00
|
|
|
|
2023-08-03 20:31:16 +00:00
|
|
|
# Using the same golang image as used to build geth: https://github.com/cerc-io/go-ethereum/blob/HEAD/Dockerfile
|
|
|
|
FROM golang:1.20-alpine as delve
|
2023-05-26 21:57:15 +00:00
|
|
|
RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
|
|
|
|
2023-06-29 21:11:28 +00:00
|
|
|
FROM cerc/plugeth-statediff:local as statediff
|
2023-08-03 20:31:16 +00:00
|
|
|
# FIXME: fork of plugeth, use stock after upstreaming patches
|
|
|
|
FROM cerc/plugeth:local as geth
|
2023-06-29 21:11:28 +00:00
|
|
|
|
|
|
|
FROM alpine:3.17
|
2023-05-26 21:57:15 +00:00
|
|
|
|
2023-08-03 20:31:16 +00:00
|
|
|
RUN apk add --no-cache bash wget python3 bind-tools postgresql-client
|
2023-05-26 21:57:15 +00:00
|
|
|
|
|
|
|
COPY run-el.sh /opt/testnet/run.sh
|
|
|
|
|
2023-08-03 20:31:16 +00:00
|
|
|
COPY --from=delve /go/bin/dlv /usr/local/bin/
|
|
|
|
COPY --from=geth /usr/local/bin/geth /usr/local/bin/
|
|
|
|
COPY --from=fnetgen /opt/genesis /opt/testnet
|
2023-06-29 21:11:28 +00:00
|
|
|
COPY --from=statediff /usr/local/lib/statediff.so /usr/local/lib/plugeth/
|
2023-05-26 21:57:15 +00:00
|
|
|
|
2023-08-03 20:31:16 +00:00
|
|
|
# Initialize the geth db with our config
|
2023-06-06 02:10:17 +00:00
|
|
|
RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey
|
|
|
|
|
2023-05-26 21:57:15 +00:00
|
|
|
ENTRYPOINT ["/opt/testnet/run.sh"]
|