Docker安装ActiveMQ(docker-compose.yml)

 

Docker安装ActiveMQ(docker-compose.yml)

 

前置条件

请先安装Docker 

 

创建docker-compose.yml文件

version: '2'
services:

  #activemq容器
  activemq:
    #name: myactivemq
    #定义主机名
    hostname: myactivemq
    #使用的镜像
    image: webcenter/activemq
    #容器的映射端口
    ports:
      - 61617:61616
      - 8162:8161
    restart: always
    #定义挂载点
    volumes:
      - ./data/activemq:/data/activemq
      - ./var/log/activemq:/var/log/activemq

将以上文件保存为docker-compose.yml文件

 

启动docker-compose脚本

docker-compose up

 

启动日志

AppledeMacBook-Pro:activemq apple$ docker-compose up
Pulling activemq (webcenter/activemq:)...
latest: Pulling from webcenter/activemq
7dcf5a444392: Pull complete
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
Creating activemq_activemq_1 ... done
Attaching to activemq_activemq_1
activemq_1  | 2019-04-16 01:50:50,441 CRIT Supervisor running as root (no user in config file)
activemq_1  | 2019-04-16 01:50:50,441 WARN Included extra file "/etc/supervisor/conf.d/cron.conf" during parsing
activemq_1  | 2019-04-16 01:50:50,442 WARN Included extra file "/etc/supervisor/conf.d/activemq.conf" during parsing
activemq_1  | 2019-04-16 01:50:50,450 INFO RPC interface 'supervisor' initialized
activemq_1  | 2019-04-16 01:50:50,450 CRIT Server 'unix_http_server' running without any HTTP authentication checking
activemq_1  | 2019-04-16 01:50:50,451 INFO supervisord started with pid 1
activemq_1  | 2019-04-16 01:50:51,455 INFO spawned: 'cron' with pid 15
activemq_1  | 2019-04-16 01:50:51,457 INFO spawned: 'activemq' with pid 16
activemq_1  | 2019-04-16 01:50:53,146 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
activemq_1  | 2019-04-16 01:50:53,147 INFO success: activemq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

 

管理页面

Docker安装ActiveMQ(docker-compose.yml)_第1张图片

本地地址:127.0.0.1:8162

登陆账号:admin/admin

 

你可能感兴趣的:(Docker,ActiveMQ)