Run Elasticsearch:
$ docker run -d --name elasticsearch --net somenetwork -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:tag
启动elasticsearch
# docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.6.2
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9baadd19b609 elasticsearch:7.6.2 "/usr/local/bin/dock…" 37 seconds ago Up 35 seconds 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 0.0.0.0:9300->9300/tcp, :::9300->9300/tcp elasticsearch
查询docker CPU内存使用情况
# docker stats
# docker stop 9baadd19b609
9baadd19b609