From 68d8bfef210218b9ee46c63480464338c3070728 Mon Sep 17 00:00:00 2001 From: Guofang Date: Thu, 13 Aug 2026 17:01:29 +0800 Subject: [PATCH] Update RapidJSON version in Dockerfiles and included libraries --- INCLUDED_LIBRARIES.md | 5 +++-- README.md | 3 ++- build-all.sh | 8 ++++++++ debian13/Dockerfile | 22 +++++++++++++++------- rockylinux9/Dockerfile | 22 +++++++++++++++------- 5 files changed, 43 insertions(+), 17 deletions(-) create mode 100755 build-all.sh diff --git a/INCLUDED_LIBRARIES.md b/INCLUDED_LIBRARIES.md index cf90f7f..9df1a25 100644 --- a/INCLUDED_LIBRARIES.md +++ b/INCLUDED_LIBRARIES.md @@ -35,7 +35,7 @@ | JsonCpp | `1.9.8` | | librdkafka | `2.15.0` | | json-c | `0.19` | -| RapidJSON | `24b5e7a8b27f42fa16b96fc70aade9106cf7102f` | +| RapidJSON | `1.1.0` | | curl | `8.21.0` | | hiredis | `1.4.1` | | GMP | `6.3.0` | @@ -43,5 +43,6 @@ | GnuTLS | `3.8.13` | | libmaxminddb | `1.13.3` | | libyaml | `0.2.5` | +| libxml2 | `2.15.3` | -The image includes position-independent static builds of these libraries. Protobuf enables zlib support, and LibDwarf enables compressed debug section support using zlib and Zstd. ZeroMQ enables CURVE security using static libsodium. CZMQ enables UUID support using static util-linux libuuid while disabling undeclared optional integrations. librdkafka includes SSL, zlib, Zstd, and bundled LZ4 support while disabling undeclared optional integrations. spdlog uses external fmt, glog uses gflags, and all Meta libraries share the same release tag. +The image includes position-independent static builds of these libraries. Protobuf and libxml2 enable zlib support, and LibDwarf enables compressed debug section support using zlib and Zstd. ZeroMQ enables CURVE security using static libsodium. CZMQ enables UUID support using static util-linux libuuid while disabling undeclared optional integrations. librdkafka includes SSL, zlib, Zstd, and bundled LZ4 support while disabling undeclared optional integrations. spdlog uses external fmt, glog uses gflags, and all Meta libraries share the same release tag. diff --git a/README.md b/README.md index 44a40df..a8a92a5 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,12 @@ Debian 13 and Rocky Linux 9 container build environments with a C/C++ toolchain, Each build script automatically selects Docker or Podman: ```sh +./build-all.sh ./debian13/build.sh ./rockylinux9/build.sh ``` -Use environment variables to select the container engine or override the image name: +Use environment variables to select the container engine or override image names: ```sh CONTAINER_ENGINE=podman IMAGE_NAME=my-build-env ./rockylinux9/build.sh diff --git a/build-all.sh b/build-all.sh new file mode 100755 index 0000000..02ec149 --- /dev/null +++ b/build-all.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +set -eu + +SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) + +"$SCRIPT_DIR/debian13/build.sh" +"$SCRIPT_DIR/rockylinux9/build.sh" diff --git a/debian13/Dockerfile b/debian13/Dockerfile index 4e02409..7ad9b75 100644 --- a/debian13/Dockerfile +++ b/debian13/Dockerfile @@ -384,13 +384,7 @@ RUN git clone --branch=json-c-0.19-20260627 --depth=1 https://github.com/json-c/ && cmake --build build --parallel "$(nproc)" --target install \ && rm -rf build src -RUN curl --fail --location --output rapidjson.tar.gz \ - https://github.com/Tencent/rapidjson/archive/24b5e7a8b27f42fa16b96fc70aade9106cf7102f.tar.gz \ - && echo "2d2601a82d2d3b7e143a3c8d43ef616671391034bc46891a9816b79cf2d3e7a8 rapidjson.tar.gz" \ - | sha256sum --check - \ - && mkdir src \ - && tar --extract --gzip --file=rapidjson.tar.gz --directory=src --strip-components=1 \ - && rm rapidjson.tar.gz \ +RUN git clone --branch=v1.1.0 --depth=1 https://github.com/Tencent/rapidjson.git src \ && cmake -S src -B build -DCMAKE_BUILD_TYPE=Release \ -DRAPIDJSON_BUILD_DOC=OFF \ -DRAPIDJSON_BUILD_EXAMPLES=OFF \ @@ -513,4 +507,18 @@ RUN git clone --branch=0.2.5 --depth=1 https://github.com/yaml/libyaml.git src \ && cmake --build build --parallel "$(nproc)" --target install \ && rm -rf build src +RUN git clone --branch=v2.15.3 --depth=1 https://gitlab.gnome.org/GNOME/libxml2.git src \ + && cmake -S src -B build -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DLIBXML2_WITH_DOCS=OFF \ + -DLIBXML2_WITH_ICU=OFF \ + -DLIBXML2_WITH_MODULES=OFF \ + -DLIBXML2_WITH_PROGRAMS=OFF \ + -DLIBXML2_WITH_PYTHON=OFF \ + -DLIBXML2_WITH_TESTS=OFF \ + -DLIBXML2_WITH_ZLIB=ON \ + && cmake --build build --parallel "$(nproc)" --target install \ + && rm -rf build src + CMD ["/bin/bash"] diff --git a/rockylinux9/Dockerfile b/rockylinux9/Dockerfile index 47ab8ef..799b3da 100644 --- a/rockylinux9/Dockerfile +++ b/rockylinux9/Dockerfile @@ -401,13 +401,7 @@ RUN git clone --branch=json-c-0.19-20260627 --depth=1 https://github.com/json-c/ && cmake --build build --parallel "$(nproc)" --target install \ && rm -rf build src -RUN curl --fail --location --output rapidjson.tar.gz \ - https://github.com/Tencent/rapidjson/archive/24b5e7a8b27f42fa16b96fc70aade9106cf7102f.tar.gz \ - && echo "2d2601a82d2d3b7e143a3c8d43ef616671391034bc46891a9816b79cf2d3e7a8 rapidjson.tar.gz" \ - | sha256sum --check - \ - && mkdir src \ - && tar --extract --gzip --file=rapidjson.tar.gz --directory=src --strip-components=1 \ - && rm rapidjson.tar.gz \ +RUN git clone --branch=v1.1.0 --depth=1 https://github.com/Tencent/rapidjson.git src \ && cmake -S src -B build -DCMAKE_BUILD_TYPE=Release \ -DRAPIDJSON_BUILD_DOC=OFF \ -DRAPIDJSON_BUILD_EXAMPLES=OFF \ @@ -530,6 +524,20 @@ RUN git clone --branch=0.2.5 --depth=1 https://github.com/yaml/libyaml.git src \ && cmake --build build --parallel "$(nproc)" --target install \ && rm -rf build src +RUN git clone --branch=v2.15.3 --depth=1 https://gitlab.gnome.org/GNOME/libxml2.git src \ + && cmake -S src -B build -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DLIBXML2_WITH_DOCS=OFF \ + -DLIBXML2_WITH_ICU=OFF \ + -DLIBXML2_WITH_MODULES=OFF \ + -DLIBXML2_WITH_PROGRAMS=OFF \ + -DLIBXML2_WITH_PYTHON=OFF \ + -DLIBXML2_WITH_TESTS=OFF \ + -DLIBXML2_WITH_ZLIB=ON \ + && cmake --build build --parallel "$(nproc)" --target install \ + && rm -rf build src + RUN cp --archive /usr/local/lib/. /usr/local/lib64/ CMD ["/bin/bash"]