zhmg23

我们是如此的不同

通过Docker安装ActiveMQ

1、安装说明

OS: ubuntu 14.04

docker  Version:      1.12.1


2、查找docker hub上的activemq镜像

#  docker search ActiveMQ

NAME                              DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED

webcenter/activemq                ActiveMQ 5.13.2 with OpenJDK-jre-8-headles...   56                   [OK]

rmohr/activemq                    Various versions of ActiveMQ neatly packet...   19                   [OK]

vromero/activemq-artemis          ActiveMQ Artemis image for 1.0.0, 1.1.0, 1...   4                    [OK]

cloudesire/activemq               Latest activemq                                 3                    [OK]

andreptb/activemq                 Debian Jessie based image with ActiveMQ in...   2                    [OK]

kdomanski/activemq                Apache ActiveMQ                                 2                    [OK]

jtech/activemq                    Latest ActiveMQ production distribution on...   1                    [OK]

andrelugomes/docker-activemq      Docker container to ActiveMQ Message Broker     1                    [OK]

lhcpig/activemq                   Docker image for ActiveMQ                       1                    [OK]

iemejia/activemq                  Alpine based version of the rmohr/docker-a...   1                    [OK]

benyoo/activemq                   activemq run in docker                          0                    [OK]

wangyanbin/activemq               activemq 5.5.1, forked from webcenter/acti...   0                    [OK]

objectstyle/activemq              ObjectStyle ActiveMQ Image                      0                    [OK]

duruo850/activemq                 activemq docker                                 0                    [OK]

expertsystems/activemq            ActiveMQ                                        0                    [OK]

elifarley/docker-activemq         Apache ActiveMQ                                 0                    [OK]

camptocamp/activemq-mcollective   Activemq image for mcollective                  0                    [OK]

onesky/activemq                   Dockerized ActiveMQ                             0                    [OK]

mattjtodd/activemq                ActiveMQ                                        0                    [OK]

arnaudeprez/activemq                                                              0                    [OK]

aexoti/activemq                   activemq server in docker container             0                    [OK]

maxird/activemq                   ActiveMQ                                        0                    [OK]

msarti/activemq                   ActiveMQ with OpenJDK 7 on Centos 7 with s...   0                    [OK]

projectomakase/activemq           Docker image for Apache ActiveMQ                0                    [OK]

ayannah/activemq                  Dockerized ActiveMQ                             0                    [OK]


通过Docker安装ActiveMQ - zhm - 合肥运维

 

3、下载docker ActiveMQ镜像

docker pull webcenter/activemq:5.13.2

这里如果网络不好,下载会很长,如果你使用rabbitmq,那可以用网易镜像,很快!

docker pull hub.c.163.com/library/rabbitmq:latest

可惜我在网易上,没有找到activemq镜像!

下载完成,docker images看下

通过Docker安装ActiveMQ - zhm - 合肥运维

4、启动activemq镜像容器

docker run --name ldb-activemq -it  -d -v /data/activemq:/data/activemq -v /var/log/activemq:/var/log/activemq  -p 8161:8161 -p 61616:61616 -p 61613:61613  webcenter/activemq:5.13.2


注:ActiveMQ默认使用的TCP连接端口是61616,监控管理端口:8161

  -P, --publish-all=false Publish all exposed ports to the host interfaces 

  # 自动映射容器对外提供服务的端口 

  -p, --publish=[] Publish a container's port to the host             

  # 指定端口映射  format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort  (use 'docker port' to see the actual mapping) 

  --privileged=false Give extended privileges to this container 

  # 提供更多的权限给容器 

  --restart="" Restart policy to apply when a container exits (no, on-failure[:max-retry], always) 

  --rm=false Automatically remove the container when it exits (incompatible with -d) 

  # 如果容器退出自动移除和 -d 选项冲突 --security-opt=[] Security Options


5、查看activemq管理页面

访问https://192.168.85.157:8161/ 输入用户名、密码,然后登陆管理系统

通过Docker安装ActiveMQ - zhm - 合肥运维

 
 至此,完成通过Docker安装ActiveMQ

评论