1、拉取redis镜像
docker pull redis
2、创建redis配置文件
mkdir -p /mydata/redis/conf
touch /mydata/redis/conf/redis.conf
3、启动redis镜像
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
4、redis配置文件介绍
https://raw.githubusercontent.com/antirez/redis/4.0/redis.conf
5、连接redis
docker exec -it redis redis-cli
标签:配置文件,部署,Redis,redis,mydata,conf,Docker,docker
From: https://www.cnblogs.com/ccblblog/p/17904845.html