环境:centos7
1、安装
docker run --restart=always --name redis -p 6379:6379 -d redis
2、测试
docker exec -it redis /bin/bash root@e57efd0c5e93:/data# /usr/local/bin/redis-cli 127.0.0.1:6379> set a 1 OK 127.0.0.1:6379> get a "1"