1、进入Docker
docker exec -it --user root xxxxxx sh
2、安装vim
atp update
apt install vim
3、找到elasticsearch.yml
路径在:/usr/share/elasticsearch/config/elasticsearch.yml
4、修改elasticsearch.yml
vim elasticsearch.yml
cluster.name: "docker-cluster"
network.host: 0.0.0.0
#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 06-10-2022 12:11:25
#
# --------------------------------------------------------------------------------
# Enable security features
xpack.security.enabled: false
xpack.security.enrollment.enabled: false
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: false
keystore.path: certs/http.p12
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
enabled: false
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["6583cdb67397"]
#----------------------- END SECURITY AUTO CONFIGURATION -------------------------
退出并保存
重新启动docker