Skip to content

Commit 03548ab

Browse files
authored
Merge pull request #439 from blackcandy-org/enabale_jemalloc
feat: enable jemalloc for improved memory usage and latency
2 parents de7ae22 + 3cfa48d commit 03548ab

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,16 @@ RUN apk add --no-cache \
4444
vips \
4545
ffmpeg \
4646
curl \
47-
gcompat
47+
gcompat \
48+
jemalloc
4849

4950
WORKDIR /app
5051

5152
EXPOSE 80
5253

54+
# Enable jemalloc for reduced memory usage and latency
55+
ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2
56+
5357
RUN addgroup -g 1000 -S app && adduser -u 1000 -S app -G app
5458

5559
COPY --from=tianon/gosu /gosu /usr/local/bin/

0 commit comments

Comments
 (0)