docker pull redis docker run -p 6379:6379 -d redis:5.0.5 redis-server 挂载目录,防止重启数据丢失docker run —name redis5 -p 6379:6379 -v D:/home/admin/redis/data:/data -d redis:5.0.5 redis-server —appendonly yes 连接redisdocker exec -ti 786cf37625a7 redis-cli