Skip to content

Commit

Permalink
jemalloc
Browse files Browse the repository at this point in the history
  • Loading branch information
fredriklindberg committed Mar 20, 2024
1 parent b72364d commit 90a4166
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION} AS builder
RUN apk add \
build-base \
cmake \
jemalloc \
python3 \
curl \
git
RUN curl -sf https://gobinaries.com/tj/node-prune | sh
RUN git config --global --add safe.directory /workdir
RUN cp /root/.gitconfig /etc/gitconfig
RUN touch /.yarnrc && chmod 666 /.yarnrc
RUN mkdir /.npm && chmod 777 /.npm
RUN npm -g install node-gyp
Expand All @@ -28,10 +31,12 @@ ENV NODE_ENV=production
COPY --from=dist /usr/local/bin/node /bin/node
COPY --from=dist /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so.6
COPY --from=dist /usr/lib/libgcc_s.so.1 /usr/lib/libgcc_s.so.1
COPY --from=dist /usr/lib/libjemalloc.so.2 /usr/lib/libjemalloc.so.2
COPY --from=dist /package/exposrd.mjs /app/exposrd.mjs
COPY --from=dist /package/node_modules /app/node_modules
RUN mkdir -p /entrypoint-initdb.d
COPY docker/entrypoint.sh /entrypoint.sh
ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2
WORKDIR /app
EXPOSE 8080
EXPOSE 8081
Expand Down

0 comments on commit 90a4166

Please sign in to comment.