Skip to content

Commit 452b00b

Browse files
committed
rptest/docker-deps: install ripgrep
Install ripgrep from github. In my testing ripgrep is close to 5x faster when searching large logfiles, though it needs to be ripgrep 15, not <= 13 that we'd get on older Ubuntu distros. So install 15.1 from github releases.
1 parent c815300 commit 452b00b

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

tests/docker/ducktape-deps/tool-pkgs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# tests, but not for building the early layers of the image themselves. They
55
# are installed relatively late in the Dockerfile, after most of the heavy
66
# "non mainline" layers have forked off.
7-
set -e
7+
set -euo pipefail
8+
89
apt-get update
910
apt-get install -qq \
1011
bind9-dnsutils \
@@ -57,3 +58,22 @@ unset LD_LIBRARY_PATH
5758
exec /usr/bin/llvm-symbolizer-$LLVM_VERSION "\$@"
5859
EOF
5960
chmod +x /usr/local/bin/llvm-symbolizer
61+
62+
###########
63+
# ripgrep #
64+
###########
65+
66+
RG_VERSION=15.1.0
67+
RG_BASE_URL="https://github.com/BurntSushi/ripgrep/releases/download"
68+
if [ $(uname -m) = "aarch64" ]; then
69+
# ripgrep- 15.1.0 -aarch64-unknown-linux-gnu.tar.gz
70+
RG_TARBALL="ripgrep-${RG_VERSION}-aarch64-unknown-linux-gnu.tar.gz"
71+
else
72+
# ripgrep- 15.1.0 -x86_64-unknown-linux-musl.tar.gz
73+
RG_TARBALL="ripgrep-${RG_VERSION}-x86_64-unknown-linux-musl.tar.gz"
74+
fi
75+
mkdir -p /opt/ripgrep
76+
RG_URL="${RG_BASE_URL}/${RG_VERSION}/${RG_TARBALL}"
77+
echo "Downloading ripgrep from ${RG_URL}"
78+
curl -sSL "$RG_URL" | tar -xz -C /opt/ripgrep --strip-components=1
79+
ln -sf /opt/ripgrep/rg /usr/local/bin/rg

0 commit comments

Comments
 (0)