es01:
image: docker.elastic.co/elasticsearch/elasticsearch:9.0.1
container_name: es01
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- bootstrap.memory_lock=true
- http.cors.allow-origin="*"
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data01:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- elastic
This works with elastic 9.0.1
https://www.elastic.co/guide/en/elasticsearch/reference/8.18/behavioral-analytics-cors.html