下载
#Apollo项目包git clone https://gitee.com/nobodyiam/apollo.git#安装docker-composecurl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-composechmod +x /usr/local/bin/docker-composeln -s /usr/local/bin/docker-compose /usr/bin/docker-composedocker-compose --version#找到apollo项目包中docker-compose.yml文件在哪个位置find ./ -name docker-compose.ymlcd apollo/scripts/docker-quick-start/docker-compose up #当前终端运行docker-compose up -d #后台运行#上述步骤完成后,apollo就已经以容器的形式启动服务了,用docker查看一下相关的容器进程[root@172 ~]# docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES2ad04bf8e988 nobodyiam/apollo-quick-start "/apollo-quick-start…" 31 minutes ago Up 16 minutes 0.0.0.0:8070->8070/tcp, :::8070->8070/tcp, 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp apollo-quick-startf2322135b632 mysql:5.7 "docker-entrypoint.s…" 31 minutes ago Up 16 minutes 33060/tcp, 0.0.0.0:13306->3306/tcp, :::13306->3306/tcp apollo-db#apollo项目通过compose方式的快速启动会有两个容器存在运行,一个是apollo项目容器,一个是apollo需要的mysqldb容器。#查看主机下网络服务启动对应的端口占用[root@172 ~]# netstat -tlunpActive Internet connections (only servers)Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program nametcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 915/sshdtcp 0 0 0.0.0.0:13306 0.0.0.0:* LISTEN 23765/docker-proxytcp 0 0 0.0.0.0:8070 0.0.0.0:* LISTEN 23918/docker-proxytcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 23881/docker-proxytcp6 0 0 :::22 :::* LISTEN 915/sshdtcp6 0 0 :::13306 :::* LISTEN 23770/docker-proxytcp6 0 0 :::8070 :::* LISTEN 23926/docker-proxytcp6 0 0 :::8080 :::* LISTEN 23890/docker-proxyudp 0 0 172.16.252.2:68 0.0.0.0:* 901/NetworkManagerudp 0 0 127.0.0.1:323 0.0.0.0:* 835/chronydudp6 0 0 ::1:323 :::* 835/chronyd#通过访问主机的8070端口进入apolli管理终端

用户名:apollo 密码admin
apollo服务后台管理页面 url:8080

mysqldb连接方式
主机ip地址
端口13306
用户名root
密码默认为空
