docker 安装 ES8
时间: 2023-11-26 14:48:48 浏览: 119
以下是在Docker中安装ES8的步骤:
1. 创建一个Docker网络
```shell
docker network create elastic
```
2. 拉取ES8的Docker镜像
```shell
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.0.0
```
3. 运行ES8容器
```shell
docker run -d --name es02 --net elastic -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:8.0.0
```
4. 验证ES8是否正常运行
```shell
curl http://localhost:9200
```
如果ES8正常运行,你应该会看到类似以下的输出:
```json
{
"name" : "es02",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "xxxxxxxxxxxxxxxxxxxx",
"version" : {
"number" : "8.0.0",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "xxxxxxxxxxxxxxxxxxxx",
"build_date" : "2021-11-11T22:08:13.918371Z",
"build_snapshot" : false,
"lucene_version" : "11.1.0",
"minimum_wire_compatibility_version" : "7.15.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}
```
5. 拉取Kibana8的Docker镜像
```shell
docker pull kibana:8.0.0
```
6. 运行Kibana8容器
```shell
docker run -d --name kb02 --net elastic -p 5601:5601 kibana:8.0.0
```
7. 验证Kibana8是否正常运行
在浏览器中打开 http://localhost:5601 ,如果Kibana8正常运行,你应该会看到Kibana8的欢迎页面。
阅读全文