拉取镜像 版本看你需要,我这里拉取的 7.6.2 版本 docker pull elasticsearch:7.6.2 创建挂载目录 #配置文件目录 mkdir -p /docker/elasticsearch/config #数据目录 mkdir -p /docker/elasticsearch/data #给目录授权 chmod 777 -R /docker/elasticsearch/ 编辑配置文件 配置文件 es.yml vim es.yml #配置文件内容 cluster.name : elasticsearch-cluster node.name : es-node06 network.bind_host : 0.0.0.0 network.publish_host : 192.168.50.106 http.port : 9200 transport.tcp.port : 9300 http.cors.enabled : true http.cors.allow-origin : "*" node.master : true node.data : true disc.... 有更新! elasticsearch 7.X docker安装部署 elasticsearch