Skip to content

Instantly share code, notes, and snippets.

@elhardoum
Last active April 13, 2023 05:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elhardoum/31ca93afcb3eb7f7c11397fedfac6ef6 to your computer and use it in GitHub Desktop.
Save elhardoum/31ca93afcb3eb7f7c11397fedfac6ef6 to your computer and use it in GitHub Desktop.
redis-cli without installing redis

Use redis-cli interactive shell without installing redis on your host machine, using docker.

Install

The following assumes you have docker engine or desktop up and running.

Add the following line to your bash profile (~/.bash_profile or ~/.bashrc)

alias redis-cli='docker run -it --rm redis:3.2-alpine redis-cli "$@"'

Usage

redis-cli -h 1.1.1.1 -a abc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment