linking kibana with elasticsearch

后端 未结 2 608
无人及你
无人及你 2021-02-06 19:06

I have the following docker containers running on my box...

CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS                  


        
2条回答
  •  佛祖请我去吃肉
    2021-02-06 19:38

    you can add ENV ELASTICSEARCH_URL=elasticsearch:9200 to your Dockerfile before build kibana, then use docker-compose to run elasticsearch with kibana like this:

    version: '2'
    services:
      elasticsearch:
       image: docker.elastic.co/elasticsearch/elasticsearch:5.3.0
       container_name: elasticsearch
       ports:
        - "9200:9200"
        - "9300:9300"
      environment:
        ES_JAVA_OPTS: "-Xmx256m -Xms256m"
     kibana:
      image: docker.elastic.co/kibana/kibana:5.3.0
      container_name: kibana
      ports:
        - "5601:5601"
      depends_on:
       - elasticsearch
    

提交回复
热议问题