Elasticsearch vm.max_map_count error in docker image on MacOS 14

I have the "vm.max_map_count [65530] is too low, increase to at least [262144]" error while elastic container starting on Docker 4.25, MacOS 14 and ARM core.

Here is my container props:

    image: elasticsearch:8.9.0
    container_name: elasticsearch
    hostname: elastic
      - node.name=elasticsearch
      - cluster.name=es-docker-cluster
      - cluster.initial_master_nodes=elasticsearch
      - bootstrap.memory_lock=true
      - 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
        soft: -1
        hard: -1
      - es-data:/usr/share/elasticsearch/data

I've tried the steps described here: Install Elasticsearch with Docker | Elasticsearch Guide [8.10] | Elastic
But it does not helps.

command docker-machine ssh fails by Error: No machine name(s) specified and no "default" machine exists . Seems to vm machine must be created, but it requires VirtualBox that runs only on Intel core Macs.
command screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty fails due to path not found.
command sudo sysctl -w vm.max_map_count=262144 fails by sysctl: unknown oid 'vm.max_map_count'error too.

May be somebody knows any another solution ?

Here is solution

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.