Linux - Install redis-cli only
From http://redis.io/topics/quickstart
wget http://download.redis.io/redis-stable.tar.gztar xvzf redis-stable.tar.gzcd redis-stablemake redis-clisudo cp src/redis-cli /usr/local/bin/
With Docker I normally use https://registry.hub.docker.com/_/redis/. If I need to add redis-cli to an image I use the following snippet.
RUN cd /tmp &&\ curl http://download.redis.io/redis-stable.tar.gz | tar xz &&\ make -C redis-stable &&\ cp redis-stable/src/redis-cli /usr/local/bin &&\ rm -rf /tmp/redis-stable