1)拉取镜像
docker pull redis
这是我在 VMware 的 CentOS 中装过的 redis 版本,拉取该指定版本使用 docker pull redis:5.0.12 命令,
不过下面在docker中安装,我们使用最新的


2)根据 redis 镜像创建 redis 容器
docker run -di --name=redis -p 6379:6379 redis:latest # 别忘了 端口映射 的配置

查看 redis 启动情况

然后使用 redis 连接工具 RedisDesktopManager 就可以直接连接 redis 容器了