Skip to content

Commit

Permalink
always pull rbuilder to have latest soruce
Browse files Browse the repository at this point in the history
  • Loading branch information
Keszey Dániel authored and Keszey Dániel committed Sep 10, 2024
1 parent b415163 commit 3d76ed5
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,37 @@ ENV FEATURES $FEATURES

# Builds dependencies
RUN cargo chef cook --profile $BUILD_PROFILE --features "$FEATURES" --recipe-path recipe.json

# Build application
COPY . .
RUN cargo build --profile $BUILD_PROFILE --features "$FEATURES" --locked --bin reth

# Clone and build rbuilder (gwyneth branch)
RUN git clone -b gwyneth https://github.com/taikoxyz/rbuilder.git /app/rbuilder
WORKDIR /app/rbuilder
RUN git pull
RUN cargo build --release

# Copy binaries to a temporary location
RUN cp /app/target/$BUILD_PROFILE/reth /app/reth
RUN cp /app/rbuilder/target/release/rbuilder /app/rbuilder

# Use Ubuntu as the release image
FROM ubuntu AS runtime
FROM ubuntu:22.04 AS runtime
WORKDIR /app

# Install necessary runtime dependencies
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
# Install necessary runtime dependencies and Rust/Cargo
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
build-essential \
libclang-dev \
pkg-config \
git \
&& rm -rf /var/lib/apt/lists/*

# Install Rust and Cargo
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Copy reth and rbuilder over from the build stage
COPY --from=builder /app/reth /usr/local/bin
Expand All @@ -60,5 +71,4 @@ COPY --from=builder /app/rbuilder /app/rbuilder
COPY LICENSE-* ./

EXPOSE 30303 30303/udp 9001 8545 8546

ENTRYPOINT ["/usr/local/bin/reth"]
ENTRYPOINT ["/usr/local/bin/reth"]

0 comments on commit 3d76ed5

Please sign in to comment.