docker pull redis
docker run -p 6379:6379 -d --name redis-cache redis
Note : use the following command if you need to save configuration files in host server not in container:
docker run -p 6379:6379 -d --name redis-cache -v /Users/mac/configs :/usr/redis_config redis redis-server /usr/local/etc/redis/redis.conf
docker exec -it redis-cache /bin/bash
redis-cli
redis-cli info stats
: show information about redis
redis-cli info memory
: show information about memory
redis-cli ping
: check resdis service
redis-cli flushall
: clear all cached data
spring.cache.type=redis
spring.cache.type=none
: if you do not have redis in local env.spring.redis.host=localhost
spring.redis.port=6379