拉取镜像
1 | docker pull rocketmqinc/rocketmq |
1 | docker pull pangliang/rocketmq-console-ng |
创建文件(要有创建权限)
1 | mkdir -p /Users/zhujx/Documents/Work_all/docker/rocketmq/nameserver/logs /Users/zhujx/Documents/Work_all/docker/rocketmq/nameserver/store |
启动
1 | docker run -d --restart=always --name rmqnamesrv --privileged=true -p 9876:9876 -v /Users/zhujx/Documents/Work_all/docker/rocketmq/nameserver/logs:/root/logs -v /Users/zhujx/Documents/Work_all/docker/rocketmq/nameserver/store:/root/store -e "MAX_POSSIBLE_HEAP=100000000" rocketmqinc/rocketmq sh mqnamesrv |
1 | docker run -d --restart=always --name rmqbroker --link rmqnamesrv:namesrv -p 10911:10911 -p 10909:10909 --privileged=true -v /Users/zhujx/Documents/Work_all/docker/rocketmq/nameserver/logs:/root/logs -v /Users/zhujx/Documents/Work_all/docker/rocketmq/nameserver/store:/root/store -v /Users/zhujx/Documents/Work_all/docker/rocketmq/broker.conf:/opt/docker/rocketmq/broker.conf -e "NAMESRV_ADDR=namesrv:9876" -e "MAX_POSSIBLE_HEAP=200000000" rocketmqinc/rocketmq sh mqbroker -c /opt/docker/rocketmq/broker.conf |
1 | docker run -d \ |