1-
2- ### Build Reth From Git:
3- ## Pulls reth from a git repository and builds it from source.
1+ # Pulls reth gnosis from a git repository and builds it from source.
42
53## Builder stage: Compiles reth from a git repository
6- FROM rust:latest as builder
7-
8- ARG github=paradigmxyz/reth
9- ARG tag=main
4+ FROM rust:latest AS builder
5+ ARG github=gnosischain/reth_gnosis
6+ ARG tag=master
107
118RUN apt-get update && apt-get install -y libclang-dev pkg-config build-essential \
129 && echo "Cloning: $github - $tag" \
13- && git clone --depth 1 --branch $tag https://github.com/$github reth \
14- && cd reth && cargo build --release \
10+ && git clone --depth 1 --branch $tag https://github.com/$github reth_gnosis \
11+ && cd reth_gnosis && cargo build --release \
1512 && cp target/release/reth /usr/local/bin/reth
1613
1714## Final stage: Sets up the environment for running reth
@@ -22,17 +19,21 @@ RUN apt-get update && apt-get install -y bash curl jq \
2219# Copy compiled binary from builder
2320COPY --from=builder /usr/local/bin/reth /usr/local/bin/reth
2421
25- # Add genesis mapper script, startup script, and enode URL retriever script
22+ # Add default genesis file and genesis mapper script.
2623COPY genesis.json /genesis.json
2724COPY mapper.jq /mapper.jq
25+
26+ # Inject the startup script.
2827COPY reth.sh /reth.sh
29- COPY enode.sh /hive-bin/enode .sh
28+ RUN chmod +x /reth .sh
3029
31- # Set execute permissions for scripts
32- RUN chmod +x /reth.sh /hive-bin/enode.sh
30+ # Inject the enode id retriever script.
31+ RUN mkdir /hive-bin
32+ COPY enode.sh /hive-bin/enode.sh
33+ RUN chmod +x /hive-bin/enode.sh
3334
3435# Create version.txt
35- RUN /usr/local/bin/reth --version | head -1 > /version.txt
36+ RUN /usr/local/bin/reth --version | sed -e 's/reth \(.*\)/\1/' > /version.txt
3637
3738# Export the usual networking ports
3839EXPOSE 8545 8546 30303 30303/udp
0 commit comments