Last active
March 30, 2020 19:27
-
-
Save rogervila/91e52f6f072fb0242fab46c307131344 to your computer and use it in GitHub Desktop.
Run Redis with Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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