check
http://xxx.xxx.xxx.xxx:9200/_nodes?filter_path=**.mlockall
My way
services:
elasticsearch:
build:
context: elasticsearch/
volumes:
- ./elasticsearch/esdata:/usr/share/elasticsearch/data:rw
- ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
ports:
- "9200:9200"
- "9300:9300"
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
networks:
- elk