Skip to content

Commit

Permalink
update docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonberg1997 committed Oct 21, 2024
1 parent dee9fa5 commit afaa31f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 6 additions & 4 deletions bsc.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ LABEL org.opencontainers.image.licenses="MIT OR Apache-2.0"
# Builds a cargo-chef plan
FROM chef AS planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
RUN rustup toolchain install nightly
RUN cargo +nightly chef prepare --recipe-path recipe.json

FROM chef AS builder
RUN rustup toolchain install nightly
COPY --from=planner /app/recipe.json recipe.json

# Build profile, release by default
Expand All @@ -28,11 +30,11 @@ ENV FEATURES $FEATURES
RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config

# Builds dependencies
RUN cargo chef cook --profile $BUILD_PROFILE --features "$FEATURES" --recipe-path recipe.json --manifest-path crates/bsc/bin/Cargo.toml
RUN cargo +nightly chef cook --profile $BUILD_PROFILE --features "$FEATURES" --recipe-path recipe.json --manifest-path crates/bsc/bin/Cargo.toml

# Build application
COPY . .
RUN cargo build --profile $BUILD_PROFILE --features "$FEATURES" --locked --bin bsc-reth --manifest-path crates/bsc/bin/Cargo.toml
RUN cargo +nightly build --profile $BUILD_PROFILE --features "$FEATURES" --bin bsc-reth --manifest-path crates/bsc/bin/Cargo.toml

# ARG is not resolved in COPY so we have to hack around it by copying the
# binary to a temporary location
Expand All @@ -49,4 +51,4 @@ COPY --from=builder /app/bsc-reth /usr/local/bin
COPY LICENSE-* ./

EXPOSE 30303 30303/udp 9001 8545 8546
ENTRYPOINT ["/usr/local/bin/bsc-reth"]
ENTRYPOINT ["/usr/local/bin/bsc-reth"]
1 change: 1 addition & 0 deletions crates/bsc/engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ where
SnapShotProvider: ParliaProvider + 'static,
{
/// Creates a new builder instance to configure all parts.
/// #[allow(clippy::too_many_arguments)]
pub fn new(
chain_spec: Arc<N::ChainSpec>,
provider: Provider,
Expand Down
7 changes: 4 additions & 3 deletions crates/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,21 @@ workspace = true

[dependencies]
# reth
reth-chainspec.workspace = true
reth-primitives-traits.workspace = true
reth-ethereum-forks.workspace = true
reth-static-file-types.workspace = true
reth-trie-common.workspace = true
revm = { workspace = true, optional = true }
revm-primitives = { workspace = true, features = ["serde"] }
reth-codecs = { workspace = true, optional = true }
reth-chainspec = { workspace = true, optional = true }

# op-reth
reth-optimism-chainspec = { workspace = true, optional = true }

# bsc-reth
reth-bsc-chainspec = { workspace = true, optional = true }
reth-bsc-forks.workspace = true
reth-bsc-forks = { workspace = true, optional = true }

# ethereum
alloy-consensus.workspace = true
Expand Down Expand Up @@ -74,7 +76,6 @@ thiserror = { workspace = true, optional = true }

[dev-dependencies]
# eth
reth-chainspec.workspace = true
reth-codecs.workspace = true
reth-primitives-traits = { workspace = true, features = ["arbitrary"] }
reth-testing-utils.workspace = true
Expand Down

0 comments on commit afaa31f

Please sign in to comment.