Create user defined network (useful for connecting to other services attached to the same network (e.g. Kibana)):
$ docker network create somenetwork
Run Elasticsearch:
$ docker run -d --name elasticsearch --net somenetwork -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.7.0
验证
> curl http://localhost:9200
二、安装Kibana 7.7.0In the given example, Kibana will a attach to a user defined network (useful for connecting to other services (e.g. Elasticsearch)). If network has not yet been created, this can be done with the following command:
$ docker network create somenetwork
Note: In this example, Kibana is using the default configuration and expects to connect to a running Elasticsearch instance at http://localhost:9200
Run Kibana
$ docker run -d --name kibana --net somenetwork -p 5601:5601 kibana:7.7.0
三、验证访问 http://localhost:5601



