-
Docker pull Docker. IO/elasticSearch: version number
-
View mirror Docker images
-
Run the container to start single-node Elastic Search
Docker run -d --name es -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" b0e9f9f047e6 docker run -d --name es -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" b0e9f9f047e6 Container name -p: port mapping -e: Setting environment variable discovery.type=single-node: running on a single machine B0e9F9F047E6: image ID If the startup fails, you can increase the memory setting: -e ES_JAVA_OPTS="-Xms512m -Xmx512m"Copy the code
-
Viewing container Status
docker ps Copy the code
-
The Node head plug-in views the cluster
-
Create indexes
-
http://192.168.64.150:9200/commodity?pretty {" acknowledged ": true," shards_acknowledged ": true," index ":" commodity "}Copy the code