<>1,docker Pull redis image
docker pull redis
<>2. docker start-up redis
2.1. establish redis Profile directory
mkdir -p /mydata/redis/conf touch /mydata/redis/conf/redis.conf
2.2 start-up redis container
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
<>3. to configure redis Persistence
echo "appendonly yes" >> /mydata/redis/conf/redis.conf
<>4. Restart effective
docker restart redis
<>5.docker Start automatic operation
docker update redis --restart=always
<>6, Client connection
docker exec -it container ID redis-cli
Technology