version: '3.8' services: rmqnamesrv: image: apache/rocketmq:5.1.0 container_name: rmqnamesrv ports: - 9876:9876 restart: always privileged: true volumes: - /usr/local/rocketmq/nameserver/logs:/home/rocketmq/logs - /usr/local/rocketmq/nameserver/bin/runserver.sh:/home/rocketmq/rocketmq-5.1.0/bin/runserver.sh environment: - MAX_HEAP_SIZE=256M - HEAP_NEWSIZE=128M command: ["sh","mqnamesrv"] broker: image: apache/rocketmq:5.1.0 container_name: rmqbroker ports: - 10909:10909 - 10911:10911 restart: always privileged: true volumes: - /usr/local/rocketmq/broker/logs:/home/rocketmq/logs - /usr/local/rocketmq/broker/store:/home/rocketmq/logs - /usr/local/rocketmq/broker/conf/broker.conf:/home/rocketmq/broker.conf - /usr/local/rocketmq/broker/bin/runbroker.sh:/home/rocketmq/rocketmq-5.1.0/bin/runbroker.sh depends_on: - 'rmqnamesrv' environment: - NAMESRV_ADDR=rmqnamesrv:9876 - MAX_HEAP_SIZE=512M - HEAP_NEWSIZE=256M command: ["sh","mqbroker","-c","/home/rocketmq/broker.conf"] rmqdashboard: image: apacherocketmq/rocketmq-dashboard:latest container_name: rocketmq-dashboard ports: - 8080:8080 restart: always privileged: true depends_on: - 'rmqnamesrv' environment: - JAVA_OPTS= -Xmx256M -Xms256M -Xmn128M -Drocketmq.namesrv.addr=rmqnamesrv:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false
标签:compose,broker,version,usr,home,docker,local,rmqnamesrv,rocketmq From: https://www.cnblogs.com/ruiy/p/17870447.html