-p 9200:9200 将容器的9200端口映射到主机的9200端口;–name elasticsearch 给以后启动的容器取名叫 elasticsearch-v /mydata/elasticsearch/data:/usr/share/elasticsearch/data 将数据文件夹挂载到主机;-v /mydata/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml 将配置…