ElasticSearch in Windows docker image vm max map count ElasticSearch in Windows docker image vm max map count elasticsearch elasticsearch

ElasticSearch in Windows docker image vm max map count


I have been stuck for months on this problem, the solution is launch the following commands on cmd.exe, as stated in the official Elasticsearch documentation:

1) wsl -d docker-desktop2) sysctl -w vm.max_map_count=262144

And you are ready to start Elasticsearch!


Currently, following this issue, the way to make it work is by wsl -d docker-desktop and sysctl -w vm.max_map_count=262144 there.

Some people got it to work persistently by echo "vm.max_map_count = 262144" > /etc/sysctl.d/99-docker-desktop.conf or echo -e "\nvm.max_map_count = 262144\n" >> /etc/sysctl.d/00-alpine.conf, but none of these worked for me.


You can set up vm.max_map_count using following commands:

docker-machine ssh

sudo sysctl -w vm.max_map_count=262144