Skip to content

Instantly share code, notes, and snippets.

@hSATAC
Created June 7, 2022 05:15
Show Gist options
  • Save hSATAC/149badc5a4ac92e6dd18d839f0d01311 to your computer and use it in GitHub Desktop.
Save hSATAC/149badc5a4ac92e6dd18d839f0d01311 to your computer and use it in GitHub Desktop.
Install redis-cli with tls in alpine
export REDIS_VERSION="6.0.4"
export REDIS_DOWNLOAD_URL="http://download.redis.io/releases/redis-${REDIS_VERSION}.tar.gz"
apk add --update --no-cache --virtual build-deps gcc make linux-headers musl-dev tar openssl-dev pkgconfig
wget -O redis.tar.gz "$REDIS_DOWNLOAD_URL"
mkdir -p /usr/src/redis
tar -xzf redis.tar.gz -C /usr/src/redis --strip-components=1
cd /usr/src/redis/src
make BUILD_TLS=yes MALLOC=libc redis-cli
@kondelik
Copy link

kondelik commented Nov 12, 2023

  • copy to bin, add +x and cleanup
cp redis-cli /usr/local/bin/
chmod +x /usr/local/bin/redis-cli
rm -r /usr/src/redis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment