|
1 | | -FROM golang:1.22 AS op |
| 1 | +FROM golang:1.23 AS op |
| 2 | + |
| 3 | +RUN curl -sSfL 'https://just.systems/install.sh' | bash -s -- --to /usr/local/bin |
2 | 4 |
|
3 | 5 | WORKDIR /app |
4 | 6 |
|
5 | | -ENV REPO=https://github.com/ethereum-optimism/optimism.git |
6 | | -ENV VERSION=v1.13.2 |
7 | | -ENV COMMIT=c8b9f62736a7dad7e569719a84c406605f4472e6 |
8 | | -RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \ |
9 | | - git switch -c branch-$VERSION && \ |
10 | | - bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' |
| 7 | +COPY versions.env /tmp/versions.env |
11 | 8 |
|
12 | | -# Install 'just' |
13 | | -RUN curl -sSfL 'https://just.systems/install.sh' | bash -s -- --to /usr/local/bin |
| 9 | +RUN . /tmp/versions.env && git clone $OP_NODE_REPO --branch $OP_NODE_TAG --single-branch . && \ |
| 10 | + git switch -c branch-$OP_NODE_TAG && \ |
| 11 | + bash -c '[ "$(git rev-parse HEAD)" = "$OP_NODE_COMMIT" ]' |
14 | 12 |
|
15 | | -RUN cd op-node && \ |
16 | | - make VERSION=$VERSION op-node |
| 13 | +RUN . /tmp/versions.env && cd op-node && \ |
| 14 | + make VERSION=$OP_NODE_TAG op-node |
17 | 15 |
|
18 | 16 | FROM rust:1.87 AS reth |
19 | 17 |
|
20 | 18 | WORKDIR /app |
21 | 19 |
|
| 20 | +COPY versions.env /tmp/versions.env |
| 21 | + |
22 | 22 | RUN apt-get update && apt-get -y upgrade && apt-get install -y git libclang-dev pkg-config curl build-essential |
23 | 23 |
|
24 | | -ENV REPO=https://github.com/paradigmxyz/reth.git |
25 | | -ENV VERSION=v1.4.3 |
26 | | -ENV COMMIT=fe3653ffe602d4e85ad213e8bd9f06e7b710c0c5 |
27 | | -RUN git clone $REPO --branch $VERSION --single-branch . && \ |
28 | | - git switch -c branch-$VERSION && \ |
29 | | - bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' |
| 24 | +RUN . /tmp/versions.env && git clone $OP_RETH_REPO --branch $OP_RETH_TAG --single-branch . && \ |
| 25 | + git switch -c branch-$OP_RETH_TAG && \ |
| 26 | + bash -c '[ "$(git rev-parse HEAD)" = "$OP_RETH_COMMIT" ]' |
30 | 27 |
|
31 | 28 | RUN cargo build --bin op-reth --profile maxperf --manifest-path crates/optimism/bin/Cargo.toml |
32 | 29 |
|
33 | 30 | FROM rust:1.87 AS reth-base |
34 | 31 |
|
35 | 32 | WORKDIR /app |
36 | 33 |
|
| 34 | +COPY versions.env /tmp/versions.env |
| 35 | + |
37 | 36 | RUN apt-get update && apt-get -y upgrade && \ |
38 | 37 | apt-get install -y git libclang-dev pkg-config curl build-essential && \ |
39 | 38 | rm -rf /var/lib/apt/lists/* |
40 | 39 |
|
41 | | -ENV REPO=https://github.com/base/node-reth.git |
42 | | -ENV VERSION=v0.1.2 |
43 | | -ENV COMMIT=7fe1d4e7c74d322d2cf78df55db40e14f466cfc6 |
44 | | -RUN git clone $REPO . && \ |
45 | | - git checkout tags/$VERSION && \ |
46 | | - bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' || (echo "Commit hash verification failed" && exit 1) |
| 40 | +RUN . /tmp/versions.env && git clone $BASE_RETH_NODE_REPO . && \ |
| 41 | + git checkout tags/$BASE_RETH_NODE_TAG && \ |
| 42 | + bash -c '[ "$(git rev-parse HEAD)" = "$BASE_RETH_NODE_COMMIT" ]' || (echo "Commit hash verification failed" && exit 1) |
47 | 43 |
|
48 | 44 | RUN cargo build --bin base-reth-node --release |
49 | 45 |
|
|
0 commit comments