docker-compose.yml for elasticsearch 7.0.1 and kibana 7.0.1

前端 未结 1 2077
予麋鹿
予麋鹿 2021-02-14 01:12

I am using Docker Desktop with linux containers on Windows 10 and would like to launch the latest versions of the elasticsearch and kibana containers over a docker compose file.

相关标签:
1条回答
  • 2021-02-14 01:39

    Making a few changes worked for me -

    • Add cluster.initial_master_nodes to the elasticsearch service in compose -

      environment:
        - cluster.initial_master_nodes=elasticsearch
      
    • vm.max_map_count on the linux box kernel setting needs to be set to at least 262144 -

      $ sudo sysctl -w vm.max_map_count=262144
      

    For development mode, you can use below settings as well -

        environment:
          - discovery.type=single-node
    

    Working compose file for me -

    version: '2.2'
    services:
      es01:
        image: docker.elastic.co/elasticsearch/elasticsearch:7.0.1
        container_name: es01
        environment:
          - cluster.initial_master_nodes=es01
        ulimits:
          memlock:
            soft: -1
            hard: -1
        ports:
          - 9200
    

    For production mode, you must consider having multiple ES nodes/containers as suggested in the official documentation

    https://www.elastic.co/guide/en/elasticsearch/reference/7.0/docker.html#docker-cli-run-prod-mode

    0 讨论(0)
提交回复
热议问题