docker 安装rocketmq
启动nameserver docker run -d -p 9876:9876 --name rmqserver foxiswho/rocketmq:server-4.5.1 启动broker
docker run -d -p 10911:10911 -p 10909:10909 --name rmqbroker --link rmqserver:namesrv -e "NAMESRV_ADDR=namesrv:9876" -e "JAVA_OPTS=-Duser.home=/opt" -e "JAVA_OPT_EXT=-server -Xms128m -Xmx128m" -v /conf/rocketmq/broker.conf:/etc/rocketmq/broker.conf foxiswho/rocketmq:broker-4.5.1
配置文件的路径为:
本机:
/conf/rocketmq/broker.conf
docker内: /etc/rocketmq/broker.conf
//配置内容
brokerClusterName = DefaultCluster
brokerName = broker-a
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
brokerIP1 = 192.168.137.100
启动管理页面 docker run -d --name rmqconsole -p 8180:8080 --link rmqserver:namesrv -e "JAVA_OPTS=-Drocketmq.namesrv.addr=namesrv:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false" -t styletang/rocketmq-console-ng 参考
https://blog.csdn.net/fenglibing/article/details/92378090