下载镜像:
docker pull apacherocketmq/rocketmq-console:2.0.0
运行镜像
docker run -d -e "JAVA_OPTS=-Drocketmq.namesrv.addr=192.168.0.105:9876;192.168.0.103:9876
-Dcom.rocketmq.sendMessageWithVIPChannel=false" \
--name rocketmq-console \
-p 8080:8080 \
-v /opt/software/rocketmq/rocketmq-console/logs:/root/logs \
-t apacherocketmq/rocketmq-console:2.0.0
参数解释
rocketmq.namesrv.addr:NameServer集群地址
/opt/software/rocketmq/rocketmq-console/logs 服务器目录地址,映射容器内 /root/logs
用来保存日志文件。