docker安装elasticsearch错误解决

1.docker 安装 elasticsearch


docker pull elasticsearch:7.3.1

2.创建容器

docker run -di --name=es1 -p 9200:9200 -p 9300:9300 docker.io/elasticsearch:7.3.1

出现报错

[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

解决办法: 查看官网安装文档
https://www.elastic.co/guide/en/elasticsearch/reference/7.3/docker.html

docker run -di --name=es1 -e ES_JAVA_POTS="-Xms256m -Xmx256m" -e "discovery.type=single-node"  -p 9200:9200 -p 9300:9300 docker.io/elasticsearch:7.3.1

注意 “discovery.type=single-node” 这个参数是在单机的时候使用
要自己搭建集群时,得挂载elasticseach.yml

https://blog.csdn.net/qq_41383176/article/details/100582781

你可能感兴趣的:(docker)