How to use the official docker elasticsearch container?

前端 未结 2 787
执笔经年
执笔经年 2020-12-02 17:43

I have the following Dockerfile:

FROM docker.elastic.co/elasticsearch/elasticsearch:5.4.0
RUN elasticsearch
EXPOSE 80

I think the 3rd line

2条回答
  •  悲哀的现实
    2020-12-02 18:38

    Your container is auto exiting because of insufficient virtual memory, by default to run an elastic search container your memory should be a min of 262144 but if you run this command sysctl vm.max_map_countand see it will be around 65530. Please increase your virtual memory count by using this command sysctl -w vm.max_map_count=262144 and run the container again docker run IMAGE IDthen you should have your container running and you should be able to access elastic search at port 9200 or 9300

    edit : check this link https://www.elastic.co/guide/en/elasticsearch/reference/5.0/vm-max-map-count.html#vm-max-map-count

提交回复
热议问题