您好,登錄后才能下訂單哦!
這篇文章主要介紹了Docker Desktop下怎么安裝rocketmq,具有一定借鑒價值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。
下載地址:Docker Desktop for Mac and Windows | Docker
docker-compose --version
docker search rocketmq
apacherocketmq/rocketmq
docker pull apacherocketmq/rocketmq
docker-compose.yml
services: namesrv: image: apacherocketmq/rocketmq container_name: rmqnamesrv ports: - 9876:9876 volumes: - D:/rocketmq/namesrv/logs:/home/rocketmq/logs command: sh mqnamesrv broker: image: apacherocketmq/rocketmq container_name: rmqbroker ports: - 10909:10909 - 10911:10911 - 10912:10912 volumes: - D:/rocketmq/broker/logs:/home/rocketmq/logs - D:/rocketmq/broker/store:/home/rocketmq/store - D:/rocketmq/broker/conf/broker.conf:/home/rocketmq/rocketmq-4.6.0/conf/broker.conf environment: NAMESRV_ADDR: "namesrv:9876" JAVA_OPTS: " -Duser.home=/opt" JAVA_OPT_EXT: "-server -Xms128m -Xmx128m -Xmn128m" command: sh mqbroker -n namesrv:9876 -c ../conf/broker.conf depends_on: - namesrv rmqconsole: image: styletang/rocketmq-console-ng container_name: rmqconsole ports: - 18080:8080 environment: JAVA_OPTS: "-Drocketmq.namesrv.addr=namesrv:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false" depends_on: - namesrv
docker中沒有指定tag,安裝時間為2021-10-13,使用latest,是4.6.0,所以修改上述配置文件到4.6.0目錄
在D:/rocketmq/broker/conf/目錄下配置broker.conf
-D:/rocketmq/broker/conf/broker.conf:/home/rocketmq/rocketmq-4.6.0/conf/broker.conf
broker.conf文件
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. brokerClusterName = DefaultCluster brokerName = broker-a brokerId = 0 deleteWhen = 04 fileReservedTime = 48 brokerRole = ASYNC_MASTER flushDiskType = ASYNC_FLUSH #使用docker-compose部署后端時,同一個局域網不需要配置brockerIP1 brokerIP1=本機的ip
在yml所在的目錄中運行
docker-compose up -d
在yml 已經將端口號改為18080
http://localhost:18080/#/
感謝你能夠認真閱讀完這篇文章,希望小編分享的“Docker Desktop下怎么安裝rocketmq”這篇文章對大家有幫助,同時也希望大家多多支持億速云,關注億速云行業資訊頻道,更多相關知識等著你來學習!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。