Rename rockylinux9 build directory to rocky9

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
GuofangandClaude Sonnet 5 committed 2026-09-15 12:09:19 +08:00
1 parent 30f1a3f771
commit 195ad299cd
8 files changed
+7 -7

No files matched your search

+609
View File
@@ -0,0 +1,609 @@
FROM docker.io/library/rockylinux:9
RUN dnf install --assumeyes --enablerepo=crb \
autoconf \
automake \
bzip2 \
ca-certificates \
cmake \
curl-minimal \
gcc \
gcc-c++ \
gcc-toolset-15-gcc-c++ \
libasan \
git \
libtool \
make \
ninja-build \
patch \
perl-core \
pkgconf-pkg-config \
rpm-build \
tar \
xz \
epel-release \
&& dnf install --assumeyes \
makeself \
&& dnf clean all \
&& rm -rf /var/cache/dnf
RUN git config --global url."https://wangguofang.net/github.com/".insteadOf "https://github.com/"
RUN curl --fail --location --output boost.tar.bz2 \
https://mirrors.aliyun.com/blfs/conglomeration/boost/boost_1_83_0.tar.bz2 \
&& echo "6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e boost.tar.bz2" \
| sha256sum --check - \
&& mkdir src \
&& tar --extract --bzip2 --file=boost.tar.bz2 --directory=src --strip-components=1 \
&& rm boost.tar.bz2 \
&& cd src \
&& ./bootstrap.sh --prefix=/usr/local \
&& ./b2 --jobs="$(nproc)" \
--with-atomic \
--with-chrono \
--with-context \
--with-date_time \
--with-filesystem \
--with-program_options \
--with-regex \
--with-system \
--with-thread \
cflags=-fPIC \
cxxflags=-fPIC \
link=static \
pch=off \
runtime-link=shared \
threading=multi \
variant=release \
install \
&& cd .. \
&& rm -rf src
RUN git clone --branch=openssl-3.0.15 --depth=1 https://github.com/openssl/openssl.git src \
&& cd src \
&& ./Configure --prefix=/usr/local --libdir=lib no-shared no-tests -fPIC \
&& make --jobs="$(nproc)" \
&& make install_sw \
&& cd .. \
&& rm -rf src
RUN git clone --branch=release-2.1.12-stable --depth=1 https://github.com/libevent/libevent.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DEVENT__DISABLE_BENCHMARK=ON \
-DEVENT__DISABLE_REGRESS=ON \
-DEVENT__DISABLE_SAMPLES=ON \
-DEVENT__DISABLE_TESTS=ON \
-DEVENT__LIBRARY_TYPE=STATIC \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v1.5.7 --depth=1 https://github.com/facebook/zstd.git src \
&& cmake -G Ninja -S src/build/cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DZSTD_BUILD_CONTRIB=OFF \
-DZSTD_BUILD_PROGRAMS=OFF \
-DZSTD_BUILD_SHARED=OFF \
-DZSTD_BUILD_STATIC=ON \
-DZSTD_BUILD_TESTS=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v1.3.1 --depth=1 https://github.com/madler/zlib.git src \
&& cd src \
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --static \
&& make --jobs="$(nproc)" \
&& make install \
&& cd .. \
&& rm -rf src
RUN git clone --branch=v3.21.12 --depth=1 https://github.com/protocolbuffers/protobuf.git src \
&& cmake -G Ninja -S src -B build -Dprotobuf_BUILD_TESTS=OFF \
-Dprotobuf_BUILD_SHARED_LIBS=OFF \
-Dprotobuf_WITH_ZLIB=ON \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=REL_2_0_5 --depth=1 https://github.com/log4cplus/log4cplus.git src \
&& git -C src submodule update --init --depth=1 threadpool \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DLOG4CPLUS_BUILD_TESTING=OFF \
-DWITH_UNIT_TESTS=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=12.2.0 --depth=1 https://github.com/fmtlib/fmt.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DFMT_DOC=OFF \
-DFMT_TEST=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v1.17.0 --depth=1 https://github.com/gabime/spdlog.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DSPDLOG_BUILD_BENCH=OFF \
-DSPDLOG_BUILD_EXAMPLE=OFF \
-DSPDLOG_BUILD_TESTS=OFF \
-DSPDLOG_FMT_EXTERNAL=ON \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v0.9.8 --depth=1 https://github.com/Neargye/magic_enum.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF \
-DMAGIC_ENUM_OPT_BUILD_TESTS=OFF \
-DMAGIC_ENUM_OPT_INSTALL=ON \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v8.2.10 --depth=1 https://github.com/fastfloat/fast_float.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DFASTFLOAT_BENCHMARKS=OFF \
-DFASTFLOAT_INSTALL=ON \
-DFASTFLOAT_TEST=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v0.7.0 --depth=1 https://github.com/Tessil/sparse-map.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v2.3.1 --depth=1 https://github.com/gflags/gflags.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_STATIC_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DINSTALL_HEADERS=ON \
-DINSTALL_SHARED_LIBS=OFF \
-DINSTALL_STATIC_LIBS=ON \
-DREGISTER_INSTALL_PREFIX=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v0.7.1 --depth=1 https://github.com/google/glog.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DWITH_GFLAGS=ON \
-DWITH_GTEST=OFF \
-DWITH_PKGCONFIG=ON \
-DWITH_UNWIND=none \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=liburing-2.15 --depth=1 https://github.com/axboe/liburing.git src \
&& cd src \
&& CFLAGS=-fPIC ./configure --prefix=/usr/local \
&& make --jobs="$(nproc)" ENABLE_SHARED=0 library \
&& make ENABLE_SHARED=0 install \
&& cd .. \
&& rm -rf src
RUN curl --fail --location --output libaio.tar.gz \
https://mirrors.tuna.tsinghua.edu.cn/debian/pool/main/liba/libaio/libaio_0.3.113.orig.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
RUN git clone --branch=v2.3.2 --depth=1 https://github.com/davea42/libdwarf-code.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_DWARFDUMP=OFF \
-DBUILD_DWARFEXAMPLE=OFF \
-DBUILD_DWARFGEN=OFF \
-DBUILD_NON_SHARED=ON \
-DBUILD_SHARED=OFF \
-DDO_TESTING=OFF \
-DENABLE_DECOMPRESSION=ON \
-DPIC_ALWAYS=ON \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=1.0.20-RELEASE --depth=1 https://github.com/jedisct1/libsodium.git src \
&& cd src \
&& ./autogen.sh \
&& ./configure --prefix=/usr/local --disable-shared --enable-static --with-pic \
&& make --jobs="$(nproc)" \
&& make install \
&& cd .. \
&& rm -rf src
RUN git clone --branch=v0.8.3 --depth=1 https://github.com/Cyan4973/xxHash.git src \
&& cmake -G Ninja -S src/cmake_unofficial -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DXXHASH_BUILD_XXHSUM=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v1.17.0 --depth=1 https://github.com/google/googletest.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_GMOCK=ON \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DINSTALL_GTEST=ON \
-Dgtest_build_samples=OFF \
-Dgtest_build_tests=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v2.0.19 --depth=1 https://github.com/numactl/numactl.git src \
&& cd src \
&& ./autogen.sh \
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --disable-shared --enable-static \
&& make --jobs="$(nproc)" \
&& make install \
&& cd .. \
&& rm -rf src
RUN git clone --branch=v2026.08.03.00 --depth=1 https://github.com/facebook/folly.git src \
&& CXXFLAGS="-DGLOG_USE_GLOG_EXPORT" \
cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBOOST_LINK_STATIC=ON \
-DBUILD_BENCHMARKS=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DPYTHON_EXTENSIONS=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v2026.08.03.00 --depth=1 https://github.com/facebookincubator/fizz.git src \
&& CXXFLAGS="-DGLOG_USE_GLOG_EXPORT" \
cmake -G Ninja -S src/fizz -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_EXAMPLES=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-Dsodium_USE_STATIC_LIBS=ON \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v2026.08.03.00 --depth=1 https://github.com/facebook/wangle.git src \
&& CXXFLAGS="-DGLOG_USE_GLOG_EXPORT" \
cmake -G Ninja -S src/wangle -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_EXAMPLES=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v2026.08.03.00 --depth=1 https://github.com/facebook/mvfst.git src \
&& CXXFLAGS="-DGLOG_USE_GLOG_EXPORT" \
cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SAMPLES=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_TOOLS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v2026.08.03.00 --depth=1 https://github.com/facebook/fbthrift.git src \
&& CXXFLAGS="-DGLOG_USE_GLOG_EXPORT" \
cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DTHRIFT_BENCHMARKS=OFF \
-Denable_tests=OFF \
-Dthrift_python=OFF \
-Dthriftpy=OFF \
-Dthriftpy3=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
COPY cachelib-optional-interface.patch /tmp/
RUN git clone --branch=v2026.08.03.00 --depth=1 https://github.com/facebook/CacheLib.git src \
&& git -C src apply /tmp/cachelib-optional-interface.patch \
&& CXXFLAGS="-DGLOG_USE_GLOG_EXPORT" \
cmake -G Ninja -S src/cachelib -B build -DCMAKE_BUILD_TYPE=Release \
-DBOOST_LINK_STATIC=ON \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_CACHELIB_INTERFACE=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src /tmp/cachelib-optional-interface.patch
RUN curl --fail --location --output util-linux.tar.xz \
https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.42/util-linux-2.42.2.tar.xz \
&& echo "03a05d3adf9602ef128f2da05b84b3205ce60c351e5737c0370f74000679ce8a util-linux.tar.xz" \
| sha256sum --check - \
&& mkdir src \
&& tar --extract --xz --file=util-linux.tar.xz --directory=src --strip-components=1 \
&& rm util-linux.tar.xz \
&& cd src \
&& CFLAGS=-fPIC ./configure --prefix=/usr/local \
--disable-all-programs \
--disable-bash-completion \
--disable-makeinstall-chown \
--disable-nls \
--disable-shared \
--enable-libuuid \
--enable-static \
&& make --jobs="$(nproc)" \
&& make install \
&& cd .. \
&& rm -rf src
RUN git clone --branch=v4.3.5 --depth=1 https://github.com/zeromq/libzmq.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED=OFF \
-DBUILD_STATIC=ON \
-DBUILD_TESTS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DENABLE_CPACK=OFF \
-DENABLE_CURVE=ON \
-DENABLE_DRAFTS=OFF \
-DWITH_DOC=OFF \
-DWITH_DOCS=OFF \
-DWITH_LIBSODIUM=ON \
-DWITH_LIBSODIUM_STATIC=ON \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v4.2.1 --depth=1 https://github.com/zeromq/czmq.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCZMQ_BUILD_SHARED=OFF \
-DCZMQ_BUILD_STATIC=ON \
-DCZMQ_WITH_LZ4=OFF \
-DCZMQ_WITH_LIBCURL=OFF \
-DCZMQ_WITH_LIBMICROHTTPD=OFF \
-DCZMQ_WITH_NSS=OFF \
-DCZMQ_WITH_SYSTEMD=OFF \
-DCZMQ_WITH_UUID=ON \
-DENABLE_DRAFTS=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=1.9.8 --depth=1 https://github.com/open-source-parsers/jsoncpp.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_OBJECT_LIBS=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_STATIC_LIBS=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DJSONCPP_WITH_EXAMPLE=OFF \
-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF \
-DJSONCPP_WITH_TESTS=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v2.15.0 --depth=1 https://github.com/confluentinc/librdkafka.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DENABLE_LZ4_EXT=OFF \
-DRDKAFKA_BUILD_EXAMPLES=OFF \
-DRDKAFKA_BUILD_STATIC=ON \
-DRDKAFKA_BUILD_TESTS=OFF \
-DWITH_CURL=OFF \
-DWITH_PLUGINS=OFF \
-DWITH_SASL=OFF \
-DWITH_SSL=ON \
-DWITH_ZLIB=ON \
-DWITH_ZSTD=ON \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=json-c-0.19-20260627 --depth=1 https://github.com/json-c/json-c.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_APPS=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_STATIC_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DDISABLE_EXTRA_LIBS=ON \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
COPY rapidjson-generic-string-ref-assignment.patch /tmp/
RUN git clone --branch=v1.1.0 --depth=1 https://github.com/Tencent/rapidjson.git src \
&& git -C src apply /tmp/rapidjson-generic-string-ref-assignment.patch \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DRAPIDJSON_BUILD_DOC=OFF \
-DRAPIDJSON_BUILD_EXAMPLES=OFF \
-DRAPIDJSON_BUILD_TESTS=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src /tmp/rapidjson-generic-string-ref-assignment.patch
RUN git clone --branch=curl-8_21_0 --depth=1 https://github.com/curl/curl.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_CURL_EXE=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_LIBCURL_DOCS=OFF \
-DBUILD_MISC_DOCS=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_STATIC_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCURL_BROTLI=OFF \
-DCURL_USE_LIBPSL=OFF \
-DCURL_USE_LIBSSH=OFF \
-DCURL_USE_LIBSSH2=OFF \
-DCURL_USE_OPENSSL=ON \
-DENABLE_CURL_MANUAL=OFF \
-DHTTP_ONLY=ON \
-DUSE_LIBIDN2=OFF \
-DUSE_NGHTTP2=OFF \
-DUSE_NGTCP2=OFF \
-DUSE_QUICHE=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=v1.4.1 --depth=1 https://github.com/redis/hiredis.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DENABLE_ASYNC_TESTS=OFF \
-DENABLE_EXAMPLES=OFF \
-DENABLE_NUGET=OFF \
-DENABLE_SSL=OFF \
-DENABLE_SSL_TESTS=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN curl --fail --location --output gmp.tar.xz \
https://mirrors.ustc.edu.cn/gnu/gmp/gmp-6.3.0.tar.xz \
&& echo "a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898 gmp.tar.xz" \
| sha256sum --check - \
&& mkdir src \
&& tar --extract --xz --file=gmp.tar.xz --directory=src --strip-components=1 \
&& rm gmp.tar.xz \
&& cd src \
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --disable-shared --enable-static \
&& make --jobs="$(nproc)" \
&& make install \
&& cd .. \
&& rm -rf src
RUN curl --fail --location --output nettle.tar.gz \
https://mirrors.ustc.edu.cn/gnu/nettle/nettle-3.10.2.tar.gz \
&& echo "fe9ff51cb1f2abb5e65a6b8c10a92da0ab5ab6eaf26e7fc2b675c45f1fb519b5 nettle.tar.gz" \
| sha256sum --check - \
&& mkdir src \
&& tar --extract --gzip --file=nettle.tar.gz --directory=src --strip-components=1 \
&& rm nettle.tar.gz \
&& cd src \
&& CFLAGS=-fPIC ./configure --prefix=/usr/local \
--disable-documentation \
--disable-shared \
--enable-static \
&& make --jobs="$(nproc)" \
&& make install \
&& cd .. \
&& rm -rf src
RUN curl --fail --location --output gnutls.tar.xz \
https://mirrors.dotsrc.org/gcrypt/gnutls/v3.8/gnutls-3.8.13.tar.xz \
&& echo "ffed8ec1bf09c2426d4f14aae377de4753b53e537d685e604e99a8b16ca9c97e gnutls.tar.xz" \
| sha256sum --check - \
&& mkdir src \
&& tar --extract --xz --file=gnutls.tar.xz --directory=src --strip-components=1 \
&& rm gnutls.tar.xz \
&& cd src \
&& CFLAGS=-fPIC ./configure --prefix=/usr/local \
--with-included-libtasn1 \
--with-included-unistring \
--disable-cxx \
--disable-doc \
--disable-manpages \
--disable-nls \
--disable-shared \
--disable-tests \
--disable-tools \
--enable-static \
--without-brotli \
--without-idn \
--without-p11-kit \
--without-tpm \
--without-tpm2 \
--without-zlib \
--without-zstd \
&& make --jobs="$(nproc)" \
&& make install \
&& cd .. \
&& rm -rf src
RUN git clone --branch=1.13.3 --depth=1 https://github.com/maxmind/libmaxminddb.git src \
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DMAXMINDDB_BUILD_BINARIES=OFF \
&& cmake --build build --parallel "$(nproc)" --target install \
&& rm -rf build src
RUN git clone --branch=0.2.5 --depth=1 https://github.com/yaml/libyaml.git src \
&& cd src \
&& ./bootstrap \
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --disable-shared --enable-static \
&& make --jobs="$(nproc)" \
&& make install \
&& cd .. \
&& rm -rf src
RUN git clone --branch=v2.15.3 --depth=1 https://gitlab.gnome.org/GNOME/libxml2.git src \
&& cmake -G Ninja -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 git clone --branch=1.3.15 --depth=1 https://github.com/sewenew/redis-plus-plus.git src \
&& cmake -G Ninja -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 git clone --branch=5.3.1 --depth=1 https://github.com/jemalloc/jemalloc.git src \
&& cd src \
&& ./autogen.sh \
&& CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --prefix=/usr/local \
--disable-doc \
--disable-shared \
--enable-static \
&& make --jobs="$(nproc)" \
&& make install \
&& cd .. \
&& rm -rf src
RUN curl --fail --location --output libproxyprotocol.tar.gz \
https://wangguofang.net/github.com/kosmas-valianos/libproxyprotocol/archive/v1.3.3.tar.gz \
&& echo "4f1cbd714e5b52a91a9a43228d55c8165b578b738f743d057ae321b69b8437f7 libproxyprotocol.tar.gz" \
| sha256sum --check - \
&& mkdir src \
&& tar --extract --gzip --file=libproxyprotocol.tar.gz --directory=src --strip-components=1 \
&& rm libproxyprotocol.tar.gz \
&& gcc -fPIC -c -o src/src/proxy_protocol.o src/src/proxy_protocol.c \
&& ar rcs /usr/local/lib/libproxyprotocol.a src/src/proxy_protocol.o \
&& cp src/src/proxy_protocol.h /usr/local/include/ \
&& rm -rf src
RUN cp --archive /usr/local/lib/. /usr/local/lib64/
RUN RUSTUP_VERSION=1.28.2 \
&& RUST_VERSION=1.98.0 \
&& RUST_ARCH="$(uname -m)" \
&& case "$RUST_ARCH" in \
x86_64) RUSTUP_SHA256=20a06e644b0d9bd2fbdbfd52d42540bdde820ea7df86e92e533c073da0cdd43c ;; \
aarch64) RUSTUP_SHA256=e3853c5a252fca15252d07cb23a1bdd9377a8c6f3efa01531109281ae47f841c ;; \
*) echo "Unsupported architecture: $RUST_ARCH" >&2; exit 1 ;; \
esac \
&& curl --fail --location --output rustup-init \
"https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${RUST_ARCH}-unknown-linux-gnu/rustup-init" \
&& echo "${RUSTUP_SHA256} rustup-init" | sha256sum --check - \
&& chmod +x rustup-init \
&& ./rustup-init -y --default-toolchain none \
&& "$HOME/.cargo/bin/rustup" --version \
&& "$HOME/.cargo/bin/rustup" toolchain install "$RUST_VERSION" --profile minimal \
&& ln --symbolic "$HOME"/.cargo/bin/* /usr/local/bin/ \
&& rm rustup-init
CMD ["/bin/bash"]