From 4cde6f6aabe81940bd913b9fda2297f4961dd0c8 Mon Sep 17 00:00:00 2001 From: klemenfn Date: Mon, 1 Dec 2025 16:03:43 +0100 Subject: [PATCH 1/4] add regular image for rippled 2.6.2 --- images/rippled/Dockerfile.2.6.2 | 102 ++++++++++++++++++++++++++++++++ images/rippled/build_2_6_2.sh | 1 + 2 files changed, 103 insertions(+) create mode 100644 images/rippled/Dockerfile.2.6.2 create mode 100755 images/rippled/build_2_6_2.sh diff --git a/images/rippled/Dockerfile.2.6.2 b/images/rippled/Dockerfile.2.6.2 new file mode 100644 index 0000000..71ecaca --- /dev/null +++ b/images/rippled/Dockerfile.2.6.2 @@ -0,0 +1,102 @@ +# syntax=docker/dockerfile:1.3-labs +FROM debian:trixie@sha256:8f6a88feef3ed01a300dafb87f208977f39dccda1fd120e878129463f7fa3b8f as build + +ARG VERSION=2.6.2 + +ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London" + +RUN <<-EOF + set -e + apt-get -y update && apt-get -y install \ + python3-venv \ + curl \ + git \ + build-essential \ + cmake +EOF + +RUN <<-EOF + set -e + echo "conan" > /tmp/requirements.in + python3 -m venv /opt/conan_env + /opt/conan_env/bin/python -m pip install pip-tools + /opt/conan_env/bin/pip-compile --generate-hashes --output-file=/tmp/requirements.txt /tmp/requirements.in + /opt/conan_env/bin/python -m pip install -r /tmp/requirements.txt --require-hashes +EOF + +RUN git clone --single-branch --branch "${VERSION}" https://github.com/ripple/rippled.git /opt/ripple + +WORKDIR /opt/ripple + +ENV PATH="/opt/conan_env/bin:$PATH" + +# https://github.com/XRPLF/rippled/blob/develop/BUILD.md +RUN <<-EOF + set -e + git config --global http.postBuffer 1048576000 + conan config install /opt/ripple/conan/profiles/default -tf $(conan config home)/profiles + conan remote add --index 0 xrplf "https://conan.ripplex.io" + mkdir cmake_build +EOF + +RUN <<-EOF + set -e + cd cmake_build + conan install \ + .. \ + --profile:host=default \ + --profile:build=default \ + --output-folder . \ + --build missing \ + --settings build_type=Release +EOF + +RUN <<-EOF + set -e + cd cmake_build + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \ + -DCMAKE_INSTALL_PREFIX=/opt/ripple/build \ + -Dstatic=ON \ + -Dxrpld=ON \ + -Dtests=OFF \ + -B./ .. +EOF + +RUN <<-EOF + set -e + cd cmake_build + cmake --build . --target install -- -j 8 + find /opt/ripple/build/bin -type f -executable -exec strip -s {} + 2>/dev/null || true + mkdir -p /opt/ripple/.ripple/db +EOF + +COPY rippled.conf validators.txt /opt/ripple/.ripple/ + +FROM debian:trixie@sha256:8f6a88feef3ed01a300dafb87f208977f39dccda1fd120e878129463f7fa3b8f +COPY --from=build /opt/ripple/build /opt/ripple/ + +ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London" +ENV PATH="/opt/ripple/bin:${PATH}" + +RUN <<-EOF +apt-get -y update && \ +apt-get -y install \ +libboost-all-dev \ +net-tools \ +curl \ +jq \ +netcat-openbsd +EOF + +RUN <<-EOF + mkdir -p /opt/ripple/.ripple/db && \ + chmod 755 /opt/ripple/.ripple/db +EOF + +COPY ./rippled.conf /opt/ripple/.ripple/rippled.conf +COPY ./validators.txt /opt/ripple/.ripple/validators.txt + +# https://xrpl.org/commandline-usage.html +ENTRYPOINT ["rippled", "--conf=/opt/ripple/.ripple/rippled.conf", "--fg"] diff --git a/images/rippled/build_2_6_2.sh b/images/rippled/build_2_6_2.sh new file mode 100755 index 0000000..ff51138 --- /dev/null +++ b/images/rippled/build_2_6_2.sh @@ -0,0 +1 @@ +docker build -f Dockerfile.2.6.2 -t flarefoundation/rippled:2.6.2 . From 0d29378ecd05088edcb61d997df6081bfb94c11f Mon Sep 17 00:00:00 2001 From: klemenfn Date: Mon, 1 Dec 2025 16:21:03 +0100 Subject: [PATCH 2/4] remove boost dep since we statically link --- images/rippled/Dockerfile.2.6.2 | 1 - 1 file changed, 1 deletion(-) diff --git a/images/rippled/Dockerfile.2.6.2 b/images/rippled/Dockerfile.2.6.2 index 71ecaca..4462c24 100644 --- a/images/rippled/Dockerfile.2.6.2 +++ b/images/rippled/Dockerfile.2.6.2 @@ -83,7 +83,6 @@ ENV PATH="/opt/ripple/bin:${PATH}" RUN <<-EOF apt-get -y update && \ apt-get -y install \ -libboost-all-dev \ net-tools \ curl \ jq \ From 4075b6ba020efd3aa933abf70514f8d0fcc6fc44 Mon Sep 17 00:00:00 2001 From: Vid Bregar Date: Mon, 1 Dec 2025 18:49:08 +0100 Subject: [PATCH 3/4] add xrpl validator keys tool --- images/rippled/Dockerfile.2.6.2 | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/images/rippled/Dockerfile.2.6.2 b/images/rippled/Dockerfile.2.6.2 index 4462c24..4aa9d64 100644 --- a/images/rippled/Dockerfile.2.6.2 +++ b/images/rippled/Dockerfile.2.6.2 @@ -34,7 +34,7 @@ ENV PATH="/opt/conan_env/bin:$PATH" RUN <<-EOF set -e git config --global http.postBuffer 1048576000 - conan config install /opt/ripple/conan/profiles/default -tf $(conan config home)/profiles + conan config install /opt/ripple/conan/profiles/default -tf $(conan config home)/profiles conan remote add --index 0 xrplf "https://conan.ripplex.io" mkdir cmake_build EOF @@ -72,10 +72,37 @@ RUN <<-EOF mkdir -p /opt/ripple/.ripple/db EOF -COPY rippled.conf validators.txt /opt/ripple/.ripple/ +WORKDIR /opt/validator-keys-tool + +RUN git clone --single-branch --branch "master" https://github.com/ripple/validator-keys-tool.git /opt/validator-keys-tool && \ + git checkout 05742108d4b7c0b7d9a97c073acd690d2c75a2b4 + +RUN <<-EOF + set -e + mkdir .build + cd .build + conan install \ + .. \ + --profile:host=default \ + --profile:build=default \ + --output-folder . \ + --build missing \ + --settings build_type=Release + cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW \ + -DCMAKE_TOOLCHAIN_FILE:FILEPATH=conan_toolchain.cmake \ + -DCMAKE_BUILD_TYPE=Release \ + .. +EOF + +RUN <<-EOF + set -e + cd .build + cmake --build . +EOF FROM debian:trixie@sha256:8f6a88feef3ed01a300dafb87f208977f39dccda1fd120e878129463f7fa3b8f COPY --from=build /opt/ripple/build /opt/ripple/ +COPY --from=build /opt/validator-keys-tool/.build/validator-keys /opt/ripple/bin/ ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London" ENV PATH="/opt/ripple/bin:${PATH}" From 742d0e97d57f92a0664f1f32464749a0af14f2ea Mon Sep 17 00:00:00 2001 From: Vid Bregar Date: Tue, 2 Dec 2025 11:25:40 +0100 Subject: [PATCH 4/4] add log path --- images/rippled/Dockerfile.2.6.2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/images/rippled/Dockerfile.2.6.2 b/images/rippled/Dockerfile.2.6.2 index 4aa9d64..7801163 100644 --- a/images/rippled/Dockerfile.2.6.2 +++ b/images/rippled/Dockerfile.2.6.2 @@ -124,5 +124,9 @@ EOF COPY ./rippled.conf /opt/ripple/.ripple/rippled.conf COPY ./validators.txt /opt/ripple/.ripple/validators.txt +RUN mkdir -p /var/log/rippled && \ + chmod 775 /var/log/rippled && \ + chown root:65532 /var/log/rippled + # https://xrpl.org/commandline-usage.html ENTRYPOINT ["rippled", "--conf=/opt/ripple/.ripple/rippled.conf", "--fg"]