Skip to content

Commit

Permalink
feat: setup jemalloc page size to 64k on arm (OT-CONTAINER-KIT#72)
Browse files Browse the repository at this point in the history
Signed-off-by: drivebyer <[email protected]>
Signed-off-by: Ivan <[email protected]>
  • Loading branch information
drivebyer authored and Ivan committed Sep 19, 2024
1 parent 5f7751f commit 3664437
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ RUN curl -fL -Lo redis-${REDIS_VERSION}.tar.gz ${REDIS_DOWNLOAD_URL}/redis-${RED

WORKDIR /tmp/redis-${REDIS_VERSION}

RUN make && \
make install BUILD_TLS=yes
RUN arch="$(uname -m)"; \
extraJemallocConfigureFlags="--with-lg-page=16"; \
if [ "$arch" = "aarch64" ] || [ "$arch" = "arm64" ]; then \
sed -ri 's!cd jemalloc && ./configure !&'"$extraJemallocConfigureFlags"' !' /tmp/redis-${REDIS_VERSION}/deps/Makefile; \
fi; \
export BUILD_TLS=yes; \
make all; \
make install

FROM alpine:3.15

Expand Down
10 changes: 8 additions & 2 deletions Dockerfile.sentinel
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ WORKDIR /tmp

RUN curl -fL -Lo redis-${REDIS_SENTINEL_VERSION}.tar.gz ${REDIS_DOWNLOAD_URL}/redis-${REDIS_SENTINEL_VERSION}.tar.gz && \
tar xvzf redis-${REDIS_SENTINEL_VERSION}.tar.gz && \
make -C redis-${REDIS_SENTINEL_VERSION} && \
make -C redis-${REDIS_SENTINEL_VERSION} install BUILD_TLS=yes
arch="$(uname -m)"; \
extraJemallocConfigureFlags="--with-lg-page=16"; \
if [ "$arch" = "aarch64" ] || [ "$arch" = "arm64" ]; then \
sed -ri 's!cd jemalloc && ./configure !&'"$extraJemallocConfigureFlags"' !' /tmp/redis-${REDIS_SENTINEL_VERSION}/deps/Makefile; \
fi; \
export BUILD_TLS=yes; \
make -C redis-${REDIS_SENTINEL_VERSION} all; \
make -C redis-${REDIS_SENTINEL_VERSION} install

FROM alpine:3.15

Expand Down

0 comments on commit 3664437

Please sign in to comment.