开发环境使用docker 快速启动 单机 RocketMq

镜像说明

https://cr.console.aliyun.com/?spm=5176.2020520001.1001.8.kpaxIC&accounttraceid=176ddc4e-62b8-46d5-bd1d-659f336e58ce#/imageDesc/cn-hangzhou/laizhenwei/rocketmq/detail

拉取镜像

docker pull registry.cn-hangzhou.aliyuncs.com/laizhenwei/rocketmq:4.2.0

创建持久化数据目录

mkdir -p /usr/local/rocketmq/store

启动容器

brokerIP1 为宿主机网卡ip,多个网卡随意选择
docker run -d --restart always --name rocketmq --net host -v /usr/local/rocketmq/store:/usr/local/rocketmq/store -e brokerIP1=192.168.91.137 rocketmq:4.2.0

测试

原文地址:https://www.cnblogs.com/sweetchildomine/p/9328698.html