From ebf0867db69895d8972f1cff31774f0e217bb00a Mon Sep 17 00:00:00 2001 From: Guofang Date: Mon, 24 Aug 2026 15:08:06 +0800 Subject: [PATCH] build: add redis-plus-plus --- debian13/Dockerfile | 30 ++++++++++++++++++++++++++++-- rockylinux9/Dockerfile | 20 ++++++++++++++++++-- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/debian13/Dockerfile b/debian13/Dockerfile index 7ad9b75..f309f2a 100644 --- a/debian13/Dockerfile +++ b/debian13/Dockerfile @@ -4,7 +4,18 @@ ENV DEBIAN_FRONTEND=noninteractive RUN sed -i 's|deb.debian.org|mirrors.ustc.edu.cn|g' /etc/apt/sources.list.d/debian.sources \ && apt-get update \ - && apt-get install --yes --no-install-recommends autoconf automake build-essential bzip2 ca-certificates cmake curl git libtool pkg-config \ + && apt-get install --yes --no-install-recommends \ + autoconf \ + automake \ + build-essential \ + bzip2 \ + ca-certificates \ + cmake \ + curl \ + git \ + libtool \ + ninja-build \ + pkg-config \ && rm -rf /var/lib/apt/lists/* RUN git config --global url."https://gh-proxy.com/https://github.com/".insteadOf "https://github.com/" @@ -171,7 +182,13 @@ RUN git clone --branch=liburing-2.15 --depth=1 https://github.com/axboe/liburing && cd .. \ && rm -rf src -RUN git clone --branch=libaio-0.3.113 --depth=1 https://pagure.io/libaio.git src \ +RUN curl --fail --location --output libaio.tar.gz \ + https://releases.pagure.org/libaio/libaio-0.3.113.tar.gz \ + && echo "2c44d1c5fd0d43752287c9ae1eb9c023f04ef848ea8d4aafa46e9aedb678200b libaio.tar.gz" \ + | sha256sum --check - \ + && mkdir src \ + && tar --extract --gzip --file=libaio.tar.gz --directory=src --strip-components=1 \ + && rm libaio.tar.gz \ && make --directory=src --jobs="$(nproc)" ENABLE_SHARED=0 \ && make --directory=src ENABLE_SHARED=0 prefix=/usr/local install \ && rm -rf src @@ -521,4 +538,13 @@ RUN git clone --branch=v2.15.3 --depth=1 https://gitlab.gnome.org/GNOME/libxml2. && cmake --build build --parallel "$(nproc)" --target install \ && rm -rf build src +RUN git clone --branch=1.3.15 --depth=1 https://github.com/sewenew/redis-plus-plus.git src \ + && cmake -S src -B build -DCMAKE_BUILD_TYPE=Release \ + -DREDIS_PLUS_PLUS_BUILD_SHARED=OFF \ + -DREDIS_PLUS_PLUS_BUILD_STATIC=ON \ + -DREDIS_PLUS_PLUS_BUILD_STATIC_WITH_PIC=ON \ + -DREDIS_PLUS_PLUS_BUILD_TEST=OFF \ + && cmake --build build --parallel "$(nproc)" --target install \ + && rm -rf build src + CMD ["/bin/bash"] diff --git a/rockylinux9/Dockerfile b/rockylinux9/Dockerfile index 799b3da..6907e89 100644 --- a/rockylinux9/Dockerfile +++ b/rockylinux9/Dockerfile @@ -1,6 +1,6 @@ FROM docker.io/rockylinux/rockylinux:9 -RUN dnf install --assumeyes \ +RUN dnf install --assumeyes --enablerepo=crb \ autoconf \ automake \ bzip2 \ @@ -13,6 +13,7 @@ RUN dnf install --assumeyes \ git \ libtool \ make \ + ninja-build \ patch \ perl-core \ pkgconf-pkg-config \ @@ -185,7 +186,13 @@ RUN git clone --branch=liburing-2.15 --depth=1 https://github.com/axboe/liburing && cd .. \ && rm -rf src -RUN git clone --branch=libaio-0.3.113 --depth=1 https://pagure.io/libaio.git src \ +RUN curl --fail --location --output libaio.tar.gz \ + https://releases.pagure.org/libaio/libaio-0.3.113.tar.gz \ + && echo "2c44d1c5fd0d43752287c9ae1eb9c023f04ef848ea8d4aafa46e9aedb678200b libaio.tar.gz" \ + | sha256sum --check - \ + && mkdir src \ + && tar --extract --gzip --file=libaio.tar.gz --directory=src --strip-components=1 \ + && rm libaio.tar.gz \ && make --directory=src --jobs="$(nproc)" ENABLE_SHARED=0 \ && make --directory=src ENABLE_SHARED=0 prefix=/usr/local install \ && rm -rf src @@ -538,6 +545,15 @@ RUN git clone --branch=v2.15.3 --depth=1 https://gitlab.gnome.org/GNOME/libxml2. && cmake --build build --parallel "$(nproc)" --target install \ && rm -rf build src +RUN git clone --branch=1.3.15 --depth=1 https://github.com/sewenew/redis-plus-plus.git src \ + && cmake -S src -B build -DCMAKE_BUILD_TYPE=Release \ + -DREDIS_PLUS_PLUS_BUILD_SHARED=OFF \ + -DREDIS_PLUS_PLUS_BUILD_STATIC=ON \ + -DREDIS_PLUS_PLUS_BUILD_STATIC_WITH_PIC=ON \ + -DREDIS_PLUS_PLUS_BUILD_TEST=OFF \ + && cmake --build build --parallel "$(nproc)" --target install \ + && rm -rf build src + RUN cp --archive /usr/local/lib/. /usr/local/lib64/ CMD ["/bin/bash"]