#查看docker中redis(连接客户端)
docker exec -it redis redis-cli
如下,为操作演示:
[root@data deploy]# docker exec -it redis redis-cli 127.0.0.1:6379> keys custom* (empty list or set) 127.0.0.1:6379> set custommyaaa womendeceshi OK 127.0.0.1:6379> get custommyaaa "womendeceshi" 127.0.0.1:6379> expire custommyaaa 3 (integer) 1 127.0.0.1:6379> get custommyaaa (nil) 127.0.0.1:6379> exit
#重启redis
docker restart redis