码迷,mamicode.com
首页 > 其他好文 > 详细

基于docker搭建redis

时间:2018-12-30 10:38:20      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:--   创建   基于   3.2   doc   下载   usr   conf   ica   

下载redis 3.2镜像
#docker pull redis:3.2

docker run -d -ti --net host --name 6379 -v /usr/local/redis/data6379:/data -v /usr/local/redis/redis6379.conf:/usr/local/redis/redis.conf docker.io/redis:3.2 redis-server /usr/local/redis/redis.conf

docker run -d -ti --net host --name 6380 -v /usr/local/redis/data6380:/data -v /usr/local/redis/redis6380.conf:/usr/local/redis/redis.conf docker.io/redis:3.2 redis-server /usr/local/redis/redis.conf

docker run -d -ti --net host --name 6381 -v /usr/local/redis/data6381:/data -v /usr/local/redis/redis6381.conf:/usr/local/redis/redis.conf docker.io/redis:3.2 redis-server /usr/local/redis/redis.conf

docker run -d -ti --net host --name 6382 -v /usr/local/redis/data6382:/data -v /usr/local/redis/redis6382.conf:/usr/local/redis/redis.conf docker.io/redis:3.2 redis-server /usr/local/redis/redis.conf

docker run -d -ti --net host --name 6383 -v /usr/local/redis/data6383:/data -v /usr/local/redis/redis6383.conf:/usr/local/redis/redis.conf docker.io/redis:3.2 redis-server /usr/local/redis/redis.conf

docker run -d -ti --net host --name 6384 -v /usr/local/redis/data6384:/data -v /usr/local/redis/redis6384.conf:/usr/local/redis/redis.conf docker.io/redis:3.2 redis-server /usr/local/redis/redis.conf

主6379 6382
主6380 6383
主6381 6384

创建集群

./redis-trib.rb create --replicas 1 172.16.0.11:6379 172.16.0.11:6380 172.16.0.11:6381 172.16.0.14:6382 172.16.0.14:6383 172.16.0.14:6384

基于docker搭建redis

标签:--   创建   基于   3.2   doc   下载   usr   conf   ica   

原文地址:http://blog.51cto.com/running/2337095

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!