OpenJDK build of Eclipse Temurin with the alternative malloc implementation - jemalloc
305
FROM docker.io/eclipse-temurin:21
RUN apt-get update && apt-get -y install gcc make bzip2 && mkdir -p /tmp/jemalloc
ADD https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2 /tmp/jemalloc.tar.bz2
RUN tar --no-same-owner --strip-components 1 -C /tmp/jemalloc/ -xvjf /tmp/jemalloc.tar.bz2 &&\
cd /tmp/jemalloc/ &&\
./configure && make && make install && make clean &&\
apt-get -y remove make gcc bzip2 &&\
rm -rf /var/cache/dnf /tmp/jemalloc.tar.bz2 /tmp/jemalloc
ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so
$ docker run -it -e MALLOC_CONF=stats_print:true petrbouda/temurin-jemalloc:21 java -version
openjdk version "21.0.1" 2023-10-17 LTS
OpenJDK Runtime Environment Temurin-21.0.1+12 (build 21.0.1+12-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.1+12 (build 21.0.1+12-LTS, mixed mode, sharing)
___ Begin jemalloc statistics ___
Version: "5.3.0-0-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c"
Build-time option settings
config.cache_oblivious: true
config.debug: false
config.fill: true
config.lazy_lock: false
config.malloc_conf: ""
config.opt_safety_checks: false
config.prof: false
config.prof_libgcc: false
config.prof_libunwind: false
config.stats: true
config.utrace: false
config.xmalloc: false
Run-time option settings
opt.abort: false
opt.abort_conf: false
opt.cache_oblivious: true
opt.confirm_conf: false
....
Content type
Image
Digest
sha256:02ec82fd6…
Size
314.4 MB
Last updated
almost 3 years ago
docker pull petrbouda/temurin-jemalloc:21