【elasticsearch+kibana基于windows docker安装】

创建网络:es和kibana容器互联

bash 复制代码
docker network create es-net

加载镜像

bash 复制代码
docker pull elasticsearch:7.12.1

运行

bash 复制代码
docker run -d --name es -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms512m -Xmx512m" -v ${你的路径}/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml -v ${你的路径}/data:/usr/share/elasticsearch/data -v ${你的路径}/plugins:/usr/share/elasticsearch/plugins --network es-net -d elasticsearch:7.12.1 

出现错误

bash 复制代码
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/run/desktop/mnt/host/d/docker/es/config/elasticsearch.yml" to rootfs at "/usr/share/elasticsearch/config/elasticsearch.yml": mount /run/desktop/mnt/host/d/docker/es/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml (via /proc/self/fd/14), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.

解决办法

改成如下:并在elasticsearch.yml 中添加配置:http.host: 0.0.0.0

重启容器

bash 复制代码
docker restart es

浏览器访问

bash 复制代码
locahost:9200

出现以上数据说明安装好了es.

安装kibana- 加载镜像

bash 复制代码
docker pull kibana:7.12.1

运行容器

bash 复制代码
docker run -d --name kibana -p 5601:5601 -e ELASTICSEARCH_HOSTS=http://es:9200 --network=es-net kibana:7.12.1

注意:es和kibana版本要一致!

浏览器访问kibana

bash 复制代码
localhost:5601

参考文章

https://blog.csdn.net/qq_39363204/article/details/108547475

相关推荐
星落梦生11 小时前
Docker学习(11)
学习·docker·容器
承渊政道11 小时前
magic-resume简历工具教程:Windows部署、在线编辑与远程访问
windows·远程访问·在线编辑·简历制作·工具教程·magic-resume
Elasticsearch12 小时前
4 种模态、100 多种语言、1 个向量空间:Microsoft Foundry 中的 Jina Embeddings v5
elasticsearch
观察员1 天前
告别频繁锁屏:5行 PowerShell 脚本实现 Windows 自动防休眠
windows·命令行
byte轻骑兵1 天前
如何为你的 Web 应用添加文档编辑能力:ONLYOFFICE 文档集成实战
docker·私有化部署·系统集成·在线协作·wsl2·onlyoffice docs
Funlang1 天前
在 Windows 95 上写前端
前端·javascript·windows
Elasticsearch1 天前
使用 Codex 来写入 PDF 文件并创建 AI Agent 对它进行问答
elasticsearch
草莓熊Lotso1 天前
【C++ 基于微服务的即时通讯系统】ElasticSearch 用户数据管理实现
linux·数据库·c++·elasticsearch·微服务·架构
岳涛1 天前
考古|搬迁 percolator 要先保住规则身份,ES 1.0 把它挪进了索引内
elasticsearch
岳涛1 天前
考古|旧查询和 _boost 在 ES 1.0 收掉,替换方向并不保证等价
elasticsearch