fix
This commit is contained in:
@@ -293,7 +293,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
fi
|
||||
|
||||
# Final stage - minimal runtime
|
||||
FROM debian:trixie-slim
|
||||
FROM debian:trixie-slim AS runtime-common
|
||||
|
||||
# Install runtime dependencies including jemalloc for better memory performance
|
||||
RUN apt-get update && apt-get install -y \
|
||||
@@ -315,13 +315,17 @@ RUN useradd -m -u 1000 -s /bin/bash reth
|
||||
RUN mkdir -p /root/.local/share/reth && \
|
||||
chown -R reth:reth /root/.local/share
|
||||
|
||||
# Use jemalloc for better memory performance
|
||||
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
|
||||
ENV MALLOC_CONF="background_thread:true,metadata_thp:auto,dirty_decay_ms:30000,muzzy_decay_ms:30000"
|
||||
|
||||
USER reth
|
||||
|
||||
EXPOSE 30303 30303/udp 9001 8545 8546
|
||||
|
||||
# Dynamic entrypoint based on build type
|
||||
ENTRYPOINT ["/usr/local/bin/reth"]
|
||||
ENTRYPOINT ["/usr/local/bin/reth"]
|
||||
|
||||
# Default: preload system jemalloc for binaries built without a bundled allocator
|
||||
FROM runtime-common AS runtime
|
||||
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
|
||||
|
||||
# alethia-reth links jemalloc statically; LD_PRELOAD causes SIGSEGV at startup
|
||||
FROM runtime-common AS runtime-alethia
|
||||
Reference in New Issue
Block a user