Sign inSign up

acanthamoeba/azure-redis-cli

By acanthamoeba

Updated almost 8 years ago

redis-cli + stunnel for easy connectivity to Azure Cache for Redis

Image
0

358

acanthamoeba/azure-redis-cli repository overview

azure-redis-cli

redis-cli + stunnel for easy connectivity to Azure Cache for Redis

TLDR

docker run --rm -it acanthamoeba/azure-redis-cli <cache_name> <key>

Detailed Usage

# Swap these vars as needed
REDIS=noel
RG=redis

# Get key
KEY=$(az redis list-keys -n $REDIS -g $RG --query 'primaryKey' -o tsv)

# Launch redis-cli
docker run --rm -it acanthamoeba/azure-redis-cli $REDIS $KEY

Extra credit

Add this to your .bashrc/.zshrc

function azure-redis-cli() {
  REDIS=$1
  RG=$(az redis list --query '[?name==`tempvm`].resourceGroup' -o tsv)
  KEY=$(az redis list-keys -n $REDIS -g $RG --query 'primaryKey' -o tsv)

  # Launch redis-cli
  docker run --rm -it acanthamoeba/azure-redis-cli $REDIS $KEY
}

Then use via azure-redis-cli <cache_name> - no password required!

Tag summary

Content type

Image

Digest

Size

15.6 MB

Last updated

almost 8 years ago

docker pull acanthamoeba/azure-redis-cli