【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

注意:eskibana版本要一致!

浏览器访问kibana

bash 复制代码
localhost:5601

参考文章

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

相关推荐
童槿顏丶2 小时前
docker自动化部署脚本
docker·eureka·自动化
天天进步20152 小时前
UI-TARS 源码解析 #22:二次开发实战:用 UI-TARS 做一个简单的 Windows 自动操作 Agent
windows·ui
啊哈一半醒2 小时前
Windows 虚拟机搭建 CentOS 全过程(2026 最新版 + 踩坑解决)
linux·windows·centos
new_zhou3 小时前
C++ 项目 AI 协作指南(Windows / MSVC 环境)
c++·人工智能·windows
Elasticsearch3 小时前
Elasticsearch:使用 AI Agent 来创建 workflows
elasticsearch
gll7735 小时前
RAG 检索层实战:Redis 缓存 + ES 混合检索 + BGE-Rerank 重排全链路落地与踩坑
elasticsearch
GlueNa2SiO36 小时前
06-Docker存储与数据持久化
笔记·学习·docker
爬楼的猪6 小时前
跟着AI Agent学powershell
windows·ai编程
笨鸟先飞,勤能补拙6 小时前
网络安全等级保护 2.0:从定级备案、建设整改到持续合规的系统指南
网络·人工智能·windows·安全·web安全·网络安全·github
一位正在转型AI全栈的前端工程师7 小时前
前端转全栈:从 502 到 200,我的第一个 Docker+Nginx+Node.js 项目
docker·容器