docker linux redis installation

 

1. docker redis query

 

docker search redis



 

 

2. Download reids

 

docker pull redis

 

 

 

3. Start redis

 

docker run -d  -v /docker/redis/data:/data --name baoyou-redis -p 6379:6379 redis redis-server --appendonly yes

 -v /docker/redis/data:/data store aof file location persistent file directory

 --name baoyou-redis container name

 -p 6379:6379 expose port

 

--appendonly yes persistence

 

 

4. Start redis-cli

 

docker run -it  --link baoyou-redis:redis --rm redis redis-cli -h redis -p 6379

 --link baoyou-redis: redis link to its own container

 

5. Restart the container

 

docker restart baoyou-redis

 Persistence still exists after restart

 


 

 

 

 

 

 

 

 

 

 

 

 

Donate to developers 

Driven by interest, I write 免费something with joy and sweat. I hope you like my work and can support it at the same time. Of course, if you have money to support a money field (support Alipay, WeChat, and the buckle group), if you have no money to support a personal field, thank you.

 

Personal homepage : http://knight-black-bob.iteye.com/



 
 
 Thank you for your sponsorship, I will do better!

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326692183&siteId=291194637