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
相关推荐
cherishSpring29 分钟前
在windows使用docker打包springboot项目镜像并上传到阿里云
spring boot·docker·容器
LKAI.33 分钟前
k8s存储动态供给StorageClass
docker·微服务·云原生·容器·kubernetes
Elasticsearch1 小时前
Elastic Platform 8.18 和 9.0:ES|QL Lookup Joins 功能现已推出,Lucene 10!
elasticsearch
马武寨山的猴子2 小时前
【MinerU】:一款将PDF转化为机器可读格式的工具——RAG加强(Docker版本)
人工智能·docker·容器·pdf·rag
高峰君主3 小时前
「Docker已死?」:基于Wasm容器的新型交付体系如何颠覆十二因素应用宣言
docker·容器·wasm
小钊(求职中)3 小时前
ElasticSearch从入门到精通-覆盖DSL操作和Java实战
java·大数据·elasticsearch·搜索引擎·全文检索
Elasticsearch5 小时前
Elastic Observability 9.0/8.18:EDOT 现已正式发布,支持 LLM observability ,以及更多功能
elasticsearch
晓柏6 小时前
Docker 部署 ELK 日志收集系统
docker
liang89996 小时前
Docker(二):docker常用命令
spring cloud·docker·容器
只会写bug的靓仔7 小时前
mac 设置飞书默认浏览器(解决系统设置默认浏览器无效)
macos·飞书