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
相关推荐
Elasticsearch2 小时前
在 Kibana Agent Builder 中创建 Agent,并为它添加自定义 Skill
elasticsearch
Elasticsearch7 小时前
使用 EDOT 安卓版衡量移动应用的服务级别目标:Elastic 可观测性中的无崩溃会话与应用无响应事件
elasticsearch
Elasticsearch8 小时前
从分散搜索到即时洞察:Iron Mountain 为何选择 Elastic 统一企业搜索
elasticsearch
凉、介10 小时前
Git 深入理解(二) | 常用命令
大数据·git·elasticsearch
lambo mercy11 小时前
04Docker_Container_容器
docker
Elasticsearch11 小时前
Elastic 与 AWS DevOps Agent 集成:利用完整上下文实现自动化事件响应
elasticsearch
Elasticsearch11 小时前
无须管道,无须复制数据:在 Elasticsearch 中使用 ES|QL 查询 Amazon S3
elasticsearch
Wellijohn21 小时前
Docker 瘦身、手写 MCP、异步并发:被问得最多的 12 个问题,一次答完
python·docker·mcp
隔窗听雨眠21 小时前
KWDB容器化部署的形态选择与参数细节
docker·时序数据库·kwdb
SeanQhl1 天前
openEuler 下 Docker 镜像操作与多阶段构建瘦身
docker·容器·镜像·openeuler·dockerfile