Skip to content

Instantly share code, notes, and snippets.

@rogervila
Last active March 30, 2020 19:27
Show Gist options
  • Save rogervila/91e52f6f072fb0242fab46c307131344 to your computer and use it in GitHub Desktop.
Save rogervila/91e52f6f072fb0242fab46c307131344 to your computer and use it in GitHub Desktop.
Run Redis with Docker
#!/usr/bin/env bash
echo -e "\\e[32mWait...\\e[0m"
docker network create -d bridge redis || true
echo -e "\\e[32mDone! redis network created\\e[0m"
echo -e "\\e[32mWait...\\e[0m"
docker run -d -p 6379:6379 --name redis --restart always \
--network=redis \
-v redis_data:/data \
redis:5-alpine
echo -e "\\e[32mDone! Redis is running on 0.0.0.0:6379\\e[0m"
echo -e "\\e[32mWait...\\e[0m"
docker run -d -p 8081:8081 --name redis-commander --restart always \
--network=redis \
-e REDIS_HOSTS=local:redis:6379 \
rediscommander/redis-commander:latest
echo -e "\\e[32mDone! Redis Commander is running on 0.0.0.0:8081\\e[0m"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment