1、下载Elasticsearch
docker pull elasticsearch
****************************************我的已经下载完成****************************************
[root@localhost admin]# docker pull elasticsearch
Using default tag: latest
latest: Pulling from library/elasticsearch
Digest: sha256:a8081d995ef3443dc6d077093172a5931e02cdb8ffddbf05c67e01d348a9770e
Status: Image is up to date for elasticsearch:latest
docker.io/library/elasticsearch:latest
2、运行Elasticsearch
docker run -d --name elasticsearch01 -p 9200:9200 elasticsearch
3、测试连接
4、Elasticsearch内存使用限制
docker run -d --name elasticsearch01 -p 9200:9200 -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms64m -Xms512m" elasticsearch01