docker 部署 rocketmq

1. 部署nameserver

docker run -d --restart=always --name rmqnamesrv --privileged=true -p 9876:9876 -v d:\tool\docker-data\rocketmq\nameserver\logs:/home/rocketmq/logs -v d:\tool\docker-data\rocketmq\nameserver\store:/home/rocketmq/store -e "MAX_POSSIBLE_HEAP=100000000" apache/rocketmq ./mqnamesrv

2. 部署broker

# 准备broker.conf配置文件

brokerClusterName = DefaultCluster
brokerName = broker-a
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
namesrvAddr=192.168.0.171:9876
brokerIP1=192.168.0.171
autoCreateTopicEnable=true
autoCreateSubscriptionGroup=true

docker run -d --restart=always --name rmqbroker --link rmqnamesrv:namesrv -p 10911:10911 -p 10909:10909  -v d:\tool\docker-data\rocketmq\broker\logs:/home/rocketmq/logs -v d:\tool\docker-data\rocketmq\broker\store:/home/rocketmq/store -v d:\tool\docker-data\rocketmq\broker\broker.conf:/home/rocketmq/broker.conf --privileged=true -e "NAMESRV_ADDR=namesrv:9876" -e "MAX_POSSIBLE_HEAP=200000000" apache/rocketmq ./mqbroker -n namesrv:9876 -c /home/rocketmq/broker.conf

3. 部署控制台

docker run -d --restart=always --name rmqadmin --link rmqnamesrv:namesrv -e "JAVA_OPTS=-Drocketmq.namesrv.addr=namesrv:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false" -p 18080:8080 pangliang/rocketmq-console-ng

你可能感兴趣的:(docker,rocketmq,docker)