mac 容器化 安装docker & es | redis

brew install docker

安装桌面版 docker-destop

在桌面端搜索对应的es 版本

docker 安装elasticsearch

先确保java 已安装 oracle-jdk17 LTS 版本

报错:ERROR: 1 bootstrap checks failed. You must address the points described in the following 1 lines before starting Elasticsearch

2024-08-08 09:10:50 bootstrap check failure 1 of 1: the default discovery settings are unsuitable for production use; at least one of discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes must be configured

ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/docker-cluster.log

原因:启动方式不对 蛇精病

修改配置文件

mdfind elasticsearch.yml && sudo vim elasticsearch.yml

复制代码
# bootstrap.ignore_system_bootstrap_checks: true

#discovery.zen.minimum_master_nodes: 1

network.host: 0.0.0.0
#- _local_
#- _site_
node.name: node-1
network.publish_host: 0.0.0.0
cluster.initial_master_nodes: ["node-1"]

# Enable scripting as described here: https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
script.inline: true
script.stored: true
script.file:   true

运行命令 输入对应的容器ID

复制代码
docker run -e ES_JAVA_OPTS="-Xms1024m -Xmx1024m" -e "discovery.type=single-node" -d -p 9200:9200 -p 9300:9300 --name elasticsearch ce6def07c368

curl http://localhost:9200

安装 redis

在docker desktop 上面搜索对应的redis 版本

在 docker desktop上面 启动 容器 或者使用命令行的方式指定容器的名称

复制代码
docker run --name redis -p6379:6379 -d redis:7.4

连接容器的 redis 因做了地址映射 可以直接在本地连接

redis-cli

安装ngrok docker 容器

在docker desktop 上搜索 ngrok

运行容器

复制代码
docker run -it--name ngrok  -e NGROK_AUTHTOKEN=token值后台获取  -d ngrok/ngrok http 8888
相关推荐
专业程序开发源1 小时前
SSM校园拍摄交流服务平台36936-计算机课程设计、毕业设计
java·spring boot·后端·python·elasticsearch·php·课程设计
更深兼春远3 小时前
第2篇:Dify 部署保姆级教程:用 Docker跑起来
docker·容器·dify
青柠之夏cc4 小时前
Kotlin Multiplatform:一次编写,全平台运行,2026 年跨平台开发的 “最优解”?
macos·objective-c·cocoa
vx_Biye_Design4 小时前
springboot宠物寄养服务预约与监管系统82684-计算机课程设计、毕业设计
java·vue.js·spring boot·elasticsearch·课程设计·express·宠物
Elastic 中国社区官方博客6 小时前
错误最多的服务运行正常:使用 ES|QL 从日志进行根因分析
大数据·运维·数据库·sql·elasticsearch·搜索引擎·全文检索
小白的码BUG之路6 小时前
Docker -- No space left on device
运维·docker·容器
程序员老陆7 小时前
Docker 命令全景指南:从镜像构建到生产运维
运维·docker·容器
灯澜忆梦18 小时前
【minio】#1 | 简介与安装
docker·对象存储·minio
yukai0800821 小时前
【203篇系列】056 我的Agent系统
大数据·elasticsearch·搜索引擎
IT大白鼠21 小时前
搜索系列 · 第 08 篇——面试收官:高频题与全景总结
elasticsearch·面试·nosql