Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rust:1.98-bookworm AS builder

RUN apt update && apt-get install -y pkg-config libjemalloc-dev libssl-dev && apt-get clean

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Libjemalloc is required, since it's default allocator used in lib.rs

@lexfrei lexfrei Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@s3rius jemalloc is still the allocator, it just doesn't come from the system package. tikv-jemalloc-sys builds jemalloc from the source it ships in the crate and links it statically. It only uses a system jemalloc when JEMALLOC_OVERRIDE is set, and we don't set it.

We've been running images without libjemalloc-dev for about a week, since this PR was opened, on our own clusters and at a few clients. The package was never used, in the runtime image it was only extra size.

RUN apt-get update && apt-get install -y pkg-config libssl-dev && apt-get clean

WORKDIR /app

Expand All @@ -12,7 +12,9 @@ RUN cargo build --release

FROM debian:bookworm AS base

RUN apt-get update && apt install -y libssl-dev ca-certificates libjemalloc-dev && apt-get clean
RUN apt-get update \
&& apt-get install --yes --no-install-recommends libssl3 ca-certificates \
&& rm -rf /var/lib/apt/lists/*

COPY --from=builder /app/target/release/robotlb /usr/local/bin/
ENV PATH=/usr/local/bin:$PATH
Expand Down
Loading