Skip to content

Commit

Permalink
fix: use rust 1.82, add static args to dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected committed Oct 22, 2024
1 parent 3883d79 commit f4a85dc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile.reproducible
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use the Rust 1.80 image based on Debian Bullseye
FROM rust:1.80-bullseye@sha256:c1490599f028ae06740706279a81c09687dde26c2d00f7160b85f63e9f6d8607 as builder
# Use the Rust 1.82 image based on Debian Bullseye
FROM rust:1.82-bullseye@sha256:c42c8ca762560c182ba30edda0e0d71a8604040af2672370559d7e854653c66d as builder

# Install specific version of libclang-dev
RUN apt-get update && apt-get install -y libclang-dev=1:11.0-51+nmu5
Expand All @@ -16,7 +16,7 @@ RUN SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) && \
echo "SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH" >> /etc/environment

# Set environment variables for reproducibility
ARG RUSTFLAGS="-C link-arg=-Wl,--build-id=none -Clink-arg=-static-libgcc -C metadata='' --remap-path-prefix $$(pwd)=."
ARG RUSTFLAGS="-C target-feature=+crt-static -C link-arg=-Wl,--build-id=none -Clink-arg=-static-libgcc -C metadata='' --remap-path-prefix $$(pwd)=."
ENV SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH \
CARGO_INCREMENTAL=0 \
LC_ALL=C \
Expand All @@ -27,8 +27,8 @@ ENV SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH \
ARG FEATURES="jemalloc asm-keccak"

# Build the project with the reproducible settings
RUN . /etc/environment && \
cargo build --bin reth --features "${FEATURES}" --profile "reproducible" --locked
RUN . /etc/environment && \
cargo build --bin reth --features "${FEATURES}" --profile "reproducible" --locked --target x86_64-unknown-linux-gnu

# Create a minimal final image with just the binary
FROM scratch as binaries
Expand Down

0 comments on commit f4a85dc

Please sign in to comment.