Skip to content

Commit 47177fb

Browse files
authored
add regular image for rippled 2.6.2 and validator-key-tool
1 parent a475c23 commit 47177fb

File tree

2 files changed

+133
-0
lines changed

2 files changed

+133
-0
lines changed

images/rippled/Dockerfile.2.6.2

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# syntax=docker/dockerfile:1.3-labs
2+
FROM debian:trixie@sha256:8f6a88feef3ed01a300dafb87f208977f39dccda1fd120e878129463f7fa3b8f as build
3+
4+
ARG VERSION=2.6.2
5+
6+
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
7+
8+
RUN <<-EOF
9+
set -e
10+
apt-get -y update && apt-get -y install \
11+
python3-venv \
12+
curl \
13+
git \
14+
build-essential \
15+
cmake
16+
EOF
17+
18+
RUN <<-EOF
19+
set -e
20+
echo "conan" > /tmp/requirements.in
21+
python3 -m venv /opt/conan_env
22+
/opt/conan_env/bin/python -m pip install pip-tools
23+
/opt/conan_env/bin/pip-compile --generate-hashes --output-file=/tmp/requirements.txt /tmp/requirements.in
24+
/opt/conan_env/bin/python -m pip install -r /tmp/requirements.txt --require-hashes
25+
EOF
26+
27+
RUN git clone --single-branch --branch "${VERSION}" https://github.com/ripple/rippled.git /opt/ripple
28+
29+
WORKDIR /opt/ripple
30+
31+
ENV PATH="/opt/conan_env/bin:$PATH"
32+
33+
# https://github.com/XRPLF/rippled/blob/develop/BUILD.md
34+
RUN <<-EOF
35+
set -e
36+
git config --global http.postBuffer 1048576000
37+
conan config install /opt/ripple/conan/profiles/default -tf $(conan config home)/profiles
38+
conan remote add --index 0 xrplf "https://conan.ripplex.io"
39+
mkdir cmake_build
40+
EOF
41+
42+
RUN <<-EOF
43+
set -e
44+
cd cmake_build
45+
conan install \
46+
.. \
47+
--profile:host=default \
48+
--profile:build=default \
49+
--output-folder . \
50+
--build missing \
51+
--settings build_type=Release
52+
EOF
53+
54+
RUN <<-EOF
55+
set -e
56+
cd cmake_build
57+
cmake \
58+
-DCMAKE_BUILD_TYPE=Release \
59+
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
60+
-DCMAKE_INSTALL_PREFIX=/opt/ripple/build \
61+
-Dstatic=ON \
62+
-Dxrpld=ON \
63+
-Dtests=OFF \
64+
-B./ ..
65+
EOF
66+
67+
RUN <<-EOF
68+
set -e
69+
cd cmake_build
70+
cmake --build . --target install -- -j 8
71+
find /opt/ripple/build/bin -type f -executable -exec strip -s {} + 2>/dev/null || true
72+
mkdir -p /opt/ripple/.ripple/db
73+
EOF
74+
75+
WORKDIR /opt/validator-keys-tool
76+
77+
RUN git clone --single-branch --branch "master" https://github.com/ripple/validator-keys-tool.git /opt/validator-keys-tool && \
78+
git checkout 05742108d4b7c0b7d9a97c073acd690d2c75a2b4
79+
80+
RUN <<-EOF
81+
set -e
82+
mkdir .build
83+
cd .build
84+
conan install \
85+
.. \
86+
--profile:host=default \
87+
--profile:build=default \
88+
--output-folder . \
89+
--build missing \
90+
--settings build_type=Release
91+
cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW \
92+
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=conan_toolchain.cmake \
93+
-DCMAKE_BUILD_TYPE=Release \
94+
..
95+
EOF
96+
97+
RUN <<-EOF
98+
set -e
99+
cd .build
100+
cmake --build .
101+
EOF
102+
103+
FROM debian:trixie@sha256:8f6a88feef3ed01a300dafb87f208977f39dccda1fd120e878129463f7fa3b8f
104+
COPY --from=build /opt/ripple/build /opt/ripple/
105+
COPY --from=build /opt/validator-keys-tool/.build/validator-keys /opt/ripple/bin/
106+
107+
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"
108+
ENV PATH="/opt/ripple/bin:${PATH}"
109+
110+
RUN <<-EOF
111+
apt-get -y update && \
112+
apt-get -y install \
113+
net-tools \
114+
curl \
115+
jq \
116+
netcat-openbsd
117+
EOF
118+
119+
RUN <<-EOF
120+
mkdir -p /opt/ripple/.ripple/db && \
121+
chmod 755 /opt/ripple/.ripple/db
122+
EOF
123+
124+
COPY ./rippled.conf /opt/ripple/.ripple/rippled.conf
125+
COPY ./validators.txt /opt/ripple/.ripple/validators.txt
126+
127+
RUN mkdir -p /var/log/rippled && \
128+
chmod 775 /var/log/rippled && \
129+
chown root:65532 /var/log/rippled
130+
131+
# https://xrpl.org/commandline-usage.html
132+
ENTRYPOINT ["rippled", "--conf=/opt/ripple/.ripple/rippled.conf", "--fg"]

images/rippled/build_2_6_2.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker build -f Dockerfile.2.6.2 -t flarefoundation/rippled:2.6.2 .

0 commit comments

Comments
 (0)