1,拉去镜像 docker pull elasticsearch 2,创建elasticsearch容器(此容器不可远程连接) docker run ‐di ‐‐name=my_es ‐p 9200:9200 ‐p 9300:9300 elasticsearch 3,将elasticsearch的配置文件挂载到宿主机,方便修改配置 docker cp my_es:/usr/share/elasticsearch/config/elasticsearch.yml /usr/share/elasticsearch.yml 4,把创建好的elasticsearch服务停止删除 docker