【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

相关推荐
love530love8 小时前
【笔记】AutoClaw NSIS 安装器卡死、进程杀不掉、目录删不了?我是这么解决的
人工智能·windows·笔记·agent
大模型码小白13 小时前
JAVA 集合框架进阶:List 与 Set 的深度解析与实战
java·开发语言·人工智能·windows·语言模型·list·ai编程
关关长语14 小时前
Wsl解决MySQL容器跨域权限问题
mysql·docker·容器
XUHUOJUN15 小时前
AKS 不是安装在 Windows Server 上,而是运行在 Windows Server 之上的 Azure 平台能力
windows·架构·k8s·azure local·azure stack
leoZ23115 小时前
Git 集成实战完全指南(四):Git 冲突解决
大数据·git·elasticsearch
Wild_Pointer.16 小时前
高效工具实战指南:Procexp64进程资源管理器
c++·windows
码上上班16 小时前
Elasticsearch课程
大数据·elasticsearch·搜索引擎
IT小辉同学16 小时前
# Milvus v3.0-beta docker-compose 启动失败完整排错教程
docker·eureka·milvus
Achou.Wang18 小时前
《从零实现cobra》手写一个 mini 版 Cobra
大数据·elasticsearch·搜索引擎
这是柠檬君18 小时前
Microsoft Activation Scripts(MAS)最新版!
windows·office