When running an elasticsearch container in the WSL2 Tech Preview, the container continually restarts itself complaining "max virtual memory areas vm.max_map_count  is too low, increase to at least "
Would it be bad to just modify sysctl.conf in the docker-desktop distro to set vm.max_map_count = 262144? I have confirmed that modifying that is persistent across restarts.
elasticsearch container should start successfully
elasticsearch container continually restarts itself
DOCKERFILE: FROM docker.elastic.co/elasticsearch/elasticsearch:6.8.4 RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install analysis-phonetic
Compose: version: '2.4' services: elasticsearch: image: elastic-nwps:6 platform: linux container_name: elasticsearch environment: - cluster.name=docker-cluster - bootstrap.memory_lock=false - "ES_JAVA_OPTS=-Xms1500m -Xmx1500m" - http.cors.enabled=true - http.cors.allow-origin="*" - http.cors.allow-headers="Access-Control-Allow-Origin, X-Requested-With, Content-Type, Content-Length, Authorization" mem_limit: 2g restart: always volumes: - esdata1:/usr/share/elasticsearch/data ports: - 9200:9200 - 9300:9300 networks: - esnet
@thespatt think I found a possible solution could you verify it for me.