Skip to content

Commit 4ce9fb4

Browse files
committed
update to vendor
1 parent 85182a1 commit 4ce9fb4

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

reproducible.Dockerfile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,28 @@ RUN rustup target add x86_64-unknown-linux-musl
2222
WORKDIR /build
2323

2424
# Reproducibility environment variables
25+
# Added -C link-arg=-s to strip symbols for bit-for-bit identity
2526
ENV 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')
3134
COPY . .
3235

33-
# Build static binary
36+
# Build using the vendored dependencies (--offline)
37+
# and your custom performance profile
3438
RUN 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

4045
RUN cp /build/target/x86_64-unknown-linux-musl/performance/katana /katana
4146

42-
# Minimal final stage
4347
FROM scratch AS final
4448
COPY --from=builder /katana /katana
49+
ENTRYPOINT ["/katana"]

0 commit comments

Comments
 (0)