1、查询拉取RocketMq镜像
搜索
RocketMQ的镜像,可以通过docker的hub.docker.com上进行搜索。
docker search rocketMq
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
foxiswho/rocketmq rocketmq 77
rocketmqinc/rocketmq Image repository for Apache RocketMQ 54
styletang/rocketmq-console-ng rocketmq-console-ng 38
apache/rocketmq 25
apacherocketmq/rocketmq Docker Image for Apache RocketMQ 22
rocketmqinc/rocketmq-broker Customized RocketMQ Broker Image for RocketM… 14
rocketmqinc/rocketmq-namesrv Customized RocketMQ Name Server Image for Ro… 9
apacherocketmq/rocketmq-broker Apache RocketMQ docker image for broker. 8
apacherocketmq/rocketmq-console This repo has moved to rocketmq-dashboard, w… 7
apacherocketmq/rocketmq-dashboard Docker Image for Apache RocketMQ Dashboard 6
apacherocketmq/rocketmq-nameserver Apache RocketMQ docker image for name server. 5
king019/rocketmq rocketmq 5
dyrnq/rocketmq This is a rocketmq docker image based AdoptO… 3
pangliang/rocketmq-console-ng 2
apacherocketmq/rocketmq-operator RocketMQ Operator is to manage RocketMQ serv… 2
toyangdon/rocketmq-broker 1
2019liurui/rocketmq-broker RocketMQ broker image for RocketMQ-Operator 1
huanwei/rocketmq 1
toyangdon/rocketmq-nameserver 1
chaiyd/rocketmq Apache RocketMQ™ is a unified messaging engi… 0
rocketmqinc/rocketmq-operator The Kubernetes operator for RocketMQ 0
pengzu/rocketmq-console-ng web console for rocketmq ,this code is from … 0
comqx/rocketmq-broker 0
407094141/rocketmq 0
镜像有很多,我们选择官方发布的镜像(
foxiswho/rocketmq)吧。我们可以使用如下命令来查询该镜像所有的版本信息。
curl https://registry.hub.docker.com/v1/repositories/foxiswho/rocketmq/tags\
| tr -d '[\[\]" ]' | tr '}' '\n'\
| awk -F: -v image='foxiswho/rocketmq' '{if(NR!=NF && $3 != ""){printf("%s:%s\n",image,$3)}}'
2、服务启动
2.1、NameServer服务启动
2.1.1、拉取Server镜像
docker pull foxiswho/rocketmq:server-4.3.2
2.1.2、启动serve服务
docker run -d -p 9876:9876 --name mqNameServe foxiswho/rocketmq:server-4.3.2
docker run -d --restart=always -v /docker/rocketmq/data/namesrv/logs:/home/rocketmq/logs --name rmqnamesrv -e "JAVA_OPT_EXT=-Xms512M -Xmx512M -Xmn128m" -p 9876:9876 foxiswho/rocketmq:4.8.0
2.2、Borker服务启动
2.2.1、拉取borker镜像
docker pull foxiswho/rocketmq:broker-4.3.2
2.2.2、启动broker服务
docker run -d -p 10911:10911 -p 10909:10909 --name mqBorker --link mqNameServer:namesrv -e "NAMESRV_ADDR=namesrv:9876" -e "JAVA_OPTS=-Duser.home=/opt" -e "JAVA_OPT_EXT=-server -Xms128m -Xmx128m" foxiswho/rocketmq:broker-4.5.1
2.3、Console控制台启动
2.3.1、控制台镜像拉取
docker pull styletang/rocketmq-console-ng
2.3.4、启动控制台服务
docker run -d --name mqConsole -p 9000:8080 --link mqNameServer:namesrv\
-e "JAVA_OPTS=-Drocketmq.namesrv.addr=namesrv:9876\
-Dcom.rocketmq.sendMessageWithVIPChannel=false"\
-t styletang/rocketmq-console-ng