From 951ebf0907fe2f4114b8961e200deac4718bad46 Mon Sep 17 00:00:00 2001 From: Guofang Date: Mon, 7 Sep 2026 11:29:15 +0800 Subject: [PATCH] Build jemalloc from source instead of via package manager Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01QKAbAkPvqqKCRZKXtZAvTx --- debian13/Dockerfile | 12 ++++++++++++ rockylinux9/Dockerfile | 14 +++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/debian13/Dockerfile b/debian13/Dockerfile index 3a957b1..feef00c 100644 --- a/debian13/Dockerfile +++ b/debian13/Dockerfile @@ -550,4 +550,16 @@ RUN git clone --branch=1.3.15 --depth=1 https://github.com/sewenew/redis-plus-pl && cmake --build build --parallel "$(nproc)" --target install \ && rm -rf build src +RUN git clone --branch=5.3.1 --depth=1 https://github.com/jemalloc/jemalloc.git src \ + && cd src \ + && ./autogen.sh \ + && CFLAGS=-fPIC ./configure --prefix=/usr/local \ + --disable-doc \ + --disable-shared \ + --enable-static \ + && make --jobs="$(nproc)" \ + && make install \ + && cd .. \ + && rm -rf src + CMD ["/bin/bash"] diff --git a/rockylinux9/Dockerfile b/rockylinux9/Dockerfile index b1abf0c..70baf42 100644 --- a/rockylinux9/Dockerfile +++ b/rockylinux9/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/rockylinux/rockylinux:9 +FROM docker.io/library/rockylinux:9 RUN dnf install --assumeyes --enablerepo=crb \ autoconf \ @@ -558,6 +558,18 @@ RUN git clone --branch=1.3.15 --depth=1 https://github.com/sewenew/redis-plus-pl && cmake --build build --parallel "$(nproc)" --target install \ && rm -rf build src +RUN git clone --branch=5.3.1 --depth=1 https://github.com/jemalloc/jemalloc.git src \ + && cd src \ + && ./autogen.sh \ + && CFLAGS=-fPIC ./configure --prefix=/usr/local \ + --disable-doc \ + --disable-shared \ + --enable-static \ + && make --jobs="$(nproc)" \ + && make install \ + && cd .. \ + && rm -rf src + RUN cp --archive /usr/local/lib/. /usr/local/lib64/ RUN RUSTUP_VERSION=1.28.2 \