1.拉取镜像
docker pull redis
2.创建实例并启动
mkdir -p /mydata/redis/conf
vi /mydata/redis/conf/redis.conf
docker run -p 6379:6379 --name redis -v /mydata/redis/data:/data
-v /mydata/redis/conf/redis.conf:/etc/redis/redis.conf
-d redis redis-server /etc/redis/redis.conf --appendonly yes