Docker部署单体ES

docker部署单体ES

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

上一篇:为什么ES里的日期查询总是差8个小时


下一篇:操作系统