Redis docker安装

拉取镜像

docker pull redis:latest

启动redis

docker run -itd --name redis -p 6379:6379 redis

端口映射到了本地6379端口

使用idea连接