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
相关推荐
Elasticsearch30 分钟前
平衡尺度:利用权重使倒数排序融合 (RRF) 更加智能
elasticsearch
小溪彼岸19 小时前
macOS自带截图命令ScreenCapture
macos
muyun28001 天前
Docker 下部署 Elasticsearch 8 并集成 Kibana 和 IK 分词器
elasticsearch·docker·容器
TESmart碲视1 天前
Mac 真正多显示器支持:TESmart USB-C KVM(搭载 DisplayLink 技术)如何实现
macos·计算机外设·电脑
傻傻虎虎1 天前
【Docker】常用帮忙、镜像、容器、其他命令合集(2)
运维·docker·容器
在未来等你1 天前
Elasticsearch面试精讲 Day 17:查询性能调优实践
大数据·分布式·elasticsearch·搜索引擎·面试
2401_897930062 天前
使用Docker轻松部署Neo4j图数据库
数据库·docker·neo4j
2501_915106322 天前
Xcode 上传 ipa 全流程详解 App Store 上架流程、uni-app 生成 ipa 文件上传与审核指南
android·macos·ios·小程序·uni-app·iphone·xcode
LeeZhao@2 天前
【AI推理部署】Docker篇04—Docker自动构建镜像
人工智能·docker·容器
程思扬2 天前
利用JSONCrack与cpolar提升数据可视化及跨团队协作效率
网络·人工智能·经验分享·docker·信息可视化·容器·架构