1. docker pull docker.elastic.co/elasticsearch/elasticsearch:7.12.0 2.创建conf 和data文件夹 3.修改权限 chmod -R 777 usr/local/etc/ES7.12.0. 4.配置elasticsearch.yml文件 cluster.name: "docker-cluster" network.host: 0.0.0.0 http.cors.enabled: true http.cors.allow-origin: "*" 5. docker run -d --name es1 -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms64m -Xms256m" -v /usr/local/etc/ES7.12.0/conf/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml -v /usr/local/etc/ES7.12.0/data:/usr/share/elasticsearch/data docker.elastic.co/elasticsearch/elasticsearch:7.12.0
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)