diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..723ef36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 25b4162..f79a317 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Dockerfile.sentinel b/Dockerfile.sentinel index 4d580a1..064f9e7 100644 --- a/Dockerfile.sentinel +++ b/Dockerfile.sentinel @@ -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