docker-compose运行ES, Kibana和Cerebro
原创转载请注明出处:https://www.cnblogs.com/agilestyle/p/11764003.html
docker-compose.yaml
1 version: '2.2' 2 services: 3 cerebro: 4 image: lmenezes/cerebro:0.8.4 5 container_name: cerebro 6 ports: 7 - "9000:9000" 8 command: 9 - -Dhosts.0.host=http://elasticsearch:9200 10 networks: 11 - es7net 12 kibana: 13 image: kibana:7.5.0 14 container_name: kibana750 15 environment: 16 - XPACK_GRAPH_ENABLED=true 17 - TIMELION_ENABLED=true 18 - XPACK_MONITORING_COLLECTION_ENABLED="true" 19 ports: 20 - "5601:5601" 21 networks: 22 - es7net 23 elasticsearch: 24 image: elasticsearch:7.5.0 25 container_name: es750 26 environment: 27 - cluster.name=haha 28 - node.name=es750 29 - bootstrap.memory_lock=true 30 - "ES_JAVA_OPTS=-Xms1g -Xmx1g" 31 - discovery.seed_hosts=es750 32 - cluster.initial_master_nodes=es750 33 ulimits: 34 memlock: 35 soft: -1 36 hard: -1 37 volumes: 38 - es750data1:/Users/haha/dockerdata/elasticsearch/data 39 ports: 40 - 9200:9200 41 - 9300:9300 42 networks: 43 - es7net 44 45 46 volumes: 47 es750data1: 48 driver: local 49 50 networks: 51 es7net: 52 driver: bridge
docker-compose指令
1 #启动 2 docker-compose up 3 4 #后台启动 5 docker-compose up -d 6 7 #停止容器 8 docker-compose down 9 10 #停止容器并且移除数据 11 docker-compose down -v
ES
http://localhost:9200/_cat/health?v
Cerebro
http://localhost:9000/#/overview?host=http:%2F%2Felasticsearch:9200
Kibana
http://localhost:5601/app/kibana#/home?_g=()
Reference
https://www.docker.com/products/docker-desktop
https://docs.docker.com/compose/install/
https://www.elastic.co/cn/blog/how-to-make-a-dockerfile-for-elasticsearch
https://www.elastic.co/cn/blog/elasticsearch-docker-plugin-management
https://www.elastic.co/cn/blog/docker-networking
强者自救 圣者渡人
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步