【ActiveMQ】使用Docker安装配置ActiveMQ

环境 CentOS7, 安装Docker

1. 使用 docker search 命令获取镜像列表,我们用第一个

docker search activemq

########################################
NAME                                     DESCRIPTION                                     STARS               OFFICIAL            AUTOMATED
webcenter/activemq                       ActiveMQ 5.14.3 with OpenJDK-jre-8-headless …   172                                     [OK]
rmohr/activemq                           Various versions of ActiveMQ neatly packet i…   109                                     [OK]
vromero/activemq-artemis                 ActiveMQ Artemis image (Debian and Alpine ba…   24                                      [OK]
cloudesire/activemq                      Latest activemq                                 4                                       [OK]
andreptb/activemq                        Debian Jessie based image with ActiveMQ inst…   3                                       [OK]
aterreno/activemq-dockerfile                                                             3                                       [OK]
tremolosecurity/activemq-docker          Hardened version of ActiveMQ for use with Op…   1                                       [OK]
spacetimeinsight/activemq                activemq                                        1                                       
antonw/activemq-jmx                      ActiveMQ with (remote) JMX                      1                                       [OK]
ddmlu/activemq-openshift                 Fork of ayannah/activemq for openShift          1                                       [OK]
jtech/activemq                           Latest ActiveMQ production distribution on l…   1                                       [OK]
smaject/activemq                         Apache ActiveMQ based on CentOS 7               1                                       [OK]
beeyond/activemq                         ActiveMQ MySQL                                  0                                       
albertonavarro/activemq12s                                                               0                                       
kibiluzbad/activemq-artemis-operator     ActiveMQ Artemis Operator                       0                                       
bgbilling/activemq                       Apache ActiveMQ                                 0                                       [OK]
aungzy/activemq                          Docker image for ActiveMQ, forked from https…   0                                       [OK]
aomitech/activemq-client                                                                 0                                       
ayannah/activemq                         Dockerized ActiveMQ                             0                                       [OK]
camptocamp/activemq-mcollective          Activemq image for mcollective                  0                                       [OK]
joakimgreenbird/activemq-bridge          Bridge from kafka to activemq.                  0                                       
duffqiu/activemq-hub                                                                     0                                       [OK]
cloudunit/activemq-5.13                  activemq-5.13                                   0                                       [OK]
duffqiu/activemq-edge                                                                    0                                       [OK]
###############################################################

2. 使用 docker pull 命令下载 activemq 镜像

docker pull webcenter/activemq

###########################################
Using default tag: latest
latest: Pulling from webcenter/activemq
7dcf5a444392: Already exists 
9eebba75a87f: Pull complete 
1f0440d87cc7: Pull complete 
dacd0555c1b4: Pull complete 
b0f19aa05a94: Pull complete 
4796f64423b2: Pull complete 
5d994b710cb9: Pull complete 
313a84c05d3c: Pull complete 
1d6a562461f1: Pull complete 
e25558998b21: Pull complete 
1423ae5a1b0b: Pull complete 
8d4e082d1ca6: Pull complete 
098d68aaa4ae: Pull complete 
Digest: sha256:35015988c4047a2ab1888466f5aae30420f7addde4c467e5db9ae64eea6b47b0
Status: Downloaded newer image for webcenter/activemq:latest
###############################################

3. 使用docker images 命令查看是否下载成功

docker images
########################################
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
redis                latest              9b188f5fb1e6        2 months ago        98.2MB
mysql                5.7                 db39680b63ac        3 months ago        437MB
centos7-jdk8         1                   ebba1353da1c        3 months ago        606MB
centos               7                   5e35e350aded        4 months ago        203MB
centos               latest              0f3e07c0138f        6 months ago        220MB
webcenter/activemq   latest              3af156432993        3 years ago         422MB
ubuntu               15.10               9b9cb95443b5        3 years ago         137MB
###########################################

4. 使用docker run 命令运行docker镜像, 61616为ActiveMQ的外部访问端口, 8161为web页面访问端口

docker run -d --name activemq -p 61616:61616 -p 8166:8161 webcenter/activemq

############################################################# a25e0bd963bd86a03725adc823fe0ae57f704dc53093d233c784d0ecfeace93a
#############################################################

使用 ip:8161访问 ActiveMQ 管理界面 登录账号密码默认是admin/admin

原文地址:https://www.cnblogs.com/yeyeck/p/12606484.html