1、拉取redis镜像
docker pull redis
2、检查redis镜像是否拉取成功
docker images | grep 'redis'
3、启动redis
docker run --restart=always -itd --name redis -p 6379:6379 redis
4、检查redis是否启动成功
docker ps | grep 'redis'
5、进入容器内
docker exec -it redis bash
docker pull redis
docker images | grep 'redis'
docker run --restart=always -itd --name redis -p 6379:6379 redis
docker ps | grep 'redis'
docker exec -it redis bash