File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -22,23 +22,28 @@ RUN rustup target add x86_64-unknown-linux-musl
2222WORKDIR /build
2323
2424# Reproducibility environment variables
25+ # Added -C link-arg=-s to strip symbols for bit-for-bit identity
2526ENV SOURCE_DATE_EPOCH=1735689600 \
26- RUSTFLAGS="--remap-path-prefix=/build=/build --remap-path-prefix=/root/. cargo=/cargo -C target-feature=+crt-static" \
27+ RUSTFLAGS="--remap-path-prefix=/build=/build --remap-path-prefix=/cargo=/cargo -C target-feature=+crt-static -C link-arg=-s " \
2728 CARGO_HOME=/cargo \
28- LANG=C.UTF-8
29+ LANG=C.UTF-8 \
30+ LC_ALL=C.UTF-8 \
31+ TZ=UTC
2932
30- # Copy source (respects .dockerignore )
33+ # Copy everything (including the 'vendor' folder and '.cargo/config.toml' )
3134COPY . .
3235
33- # Build static binary
36+ # Build using the vendored dependencies (--offline)
37+ # and your custom performance profile
3438RUN cargo build \
39+ --offline \
3540 --locked \
3641 --target x86_64-unknown-linux-musl \
37- --bin katana \
38- --profile performance
42+ --profile performance \
43+ --bin katana
3944
4045RUN cp /build/target/x86_64-unknown-linux-musl/performance/katana /katana
4146
42- # Minimal final stage
4347FROM scratch AS final
4448COPY --from=builder /katana /katana
49+ ENTRYPOINT ["/katana" ]
You can’t perform that action at this time.
0 commit comments