Skip to content

Instantly share code, notes, and snippets.

@goosys
Last active December 21, 2023 13:43
Show Gist options
  • Save goosys/d82ab71524e7fb309a6d9b5d604c4b1c to your computer and use it in GitHub Desktop.
Save goosys/d82ab71524e7fb309a6d9b5d604c4b1c to your computer and use it in GitHub Desktop.
FROM ruby:3.1-slim-bookworm as jemalloc
RUN apt-get update
RUN apt-get install -y wget
RUN apt-get install -y build-essential
RUN wget -O - https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2 | tar -xj && \
cd jemalloc-5.3.0 && \
./configure && \
make && \
make install
FROM ruby:3.1-slim-bookworm
COPY --from=jemalloc /usr/local/lib/libjemalloc.so.2 /usr/local/lib/
FROM ruby:2.7.2-alpine as jemalloc
RUN apk add build-base
RUN wget -O - https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2 | tar -xj && \
cd jemalloc-5.2.1 && \
./configure && \
make && \
make install
FROM ruby:2.7.2-alpine
COPY --from=jemalloc /usr/local/lib/libjemalloc.so.2 /usr/local/lib/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment