多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
**1. 下载镜像** ``` docker pull elasticsearch:7.7.0 ``` **2. 创建共享卷** ``` mkdir -p /mydata/elasticsearch/config mkdir -p /mydata/elasticsearch/dataecho "http.host: echo "http.host: 0.0.0.0"\>>/mydata/elasticsearch/config/elasticsearch.yml chmod -R 777 elasticsearch/ ``` **3. 启动容器** ``` docker run --name elasticsearch -p 9200:9200 \ -p 9300:9300 \ --restart=always \ -e "discovery.type=single-node" \ -e ES_JAVA_OPTS="-Xms64m -Xmx128m" \ -v /mydata/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \ -v /mydata/elasticsearch/data:/usr/share/elasticsearch/data \ -v /mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins \ -d elasticsearch:7.7.0 ``` **4.验证** ``` [root@10 ~]# curl http://localhost:9200/ { "name" : "ff7d01988701", "cluster_name" : "elasticsearch", "cluster_uuid" : "U3JUU3m0RS6PObo8KWmlnA", "version" : { "number" : "7.7.0", "build_flavor" : "default", "build_type" : "docker", "build_hash" : "81a1e9eda8e6183f5237786246f6dced26a10eaf", "build_date" : "2020-05-12T02:01:37.602180Z", "build_snapshot" : false, "lucene_version" : "8.5.1", "minimum_wire_compatibility_version" : "6.8.0", "minimum_index_compatibility_version" : "6.0.0-beta1" }, "tagline" : "You Know, for Search" } ```