1.拉取es docker镜像,地址:https://www.docker.elastic.co/r/elasticsearch/elasticsearch
ES docker安装参考:https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
ES参数配置:https://www.cnblogs.com/aqicheng/p/14262484.html
2.ES单节点群集,docker-compose.yml内容如下:
version: ‘3‘ services: watchad_elasticsearch7: image: docker.elastic.co/elasticsearch/elasticsearch:7.15.0 container_name: es7 hostname: es7 environment: http.host: 0.0.0.0 transport.host: 127.0.0.1 cluster.name: docker-cluster bootstrap.memory_lock: "true" ES_JAVA_OPTS: "-Xms512m -Xmx512m" #设置占用内存大小 -Xms2g -Xmx2g thread_pool.write.size: 9 #设置写入线程数量及队列大小 thread_pool.write.queue_size: 1000 xpack.security.enabled: "false" ulimits: memlock: soft: -1 hard: -1 nofile: soft: 65536 hard: 65536 ports: - "9201:9200" networks: - watchad-master_default restart: always networks: watchad-master_default: external: true
3.ES多节节点群集,docker-compose.yml内容如下:
原文:https://www.cnblogs.com/dreamer-fish/p/15347032.html