Skip to content

Commit 39ea756

Browse files
committed
Add mimalloc
1 parent e8c65cf commit 39ea756

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ ARG EXT_DEV
1111
ARG MIRROR
1212
ARG CURL_PROXY
1313

14+
# setup mimalloc
15+
RUN --mount=type=cache,id=alpine-apk-${ALPINE_VERSION},target=/var/cache/apk \
16+
set -eo pipefail ; \
17+
cp /etc/apk/repositories /etc/apk/repositories.orig && \
18+
echo "${MIRROR}/alpine/v3.22/main" > /etc/apk/repositories && \
19+
echo "${MIRROR}/alpine/v3.22/community" >> /etc/apk/repositories && \
20+
apk add --no-cache mimalloc2 && \
21+
mv /etc/apk/repositories.orig /etc/apk/repositories
22+
23+
ENV LD_PRELOAD=/usr/lib/libmimalloc.so.2
24+
1425
RUN --mount=type=cache,id=alpine-apk-${ALPINE_VERSION},target=/var/cache/apk \
1526
set -eo pipefail ; \
1627
cp /etc/apk/repositories /etc/apk/repositories.orig && \

0 commit comments

Comments
 (0)