echo 'vm.max_map_count=262144'>/etc/sysctl.conf & sysctl -p
docker-compose down -v & docker-compose up
docker compose主要就是用在單臺機器上的。多機器的,因該需要docker swam或者是kubernetes。
如果需要針對docker容器中的ES安裝插件,可以使用如下命令先進入容器內部:docker exec -it container_name /bin/bash。然後再執行安裝命令如:elasticsearch-plugin install
docker-compose.ymal去下載對應鏡像時候,發現下載好慢
可以嘗試配置docker 國內的鏡像
https://blog.csdn.net/whatday/article/details/86770609
https://www.cnblogs.com/wushuaishuai/p/9984228.html
curl http://127.0.0.1:9200/_cat/health
docker 搭建分佈式elasticsearch 的相關文檔
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
如果需要針對docker容器中的ES安裝插件,可以使用如下命令先進入容器內部:docker exec -it container_name /bin/bash。
然後再執行安裝命令如:elasticsearch-plugin install
7.2版本的dockers-compose.yml文件中設置elasticsearch時多了一個參數:- network.publish_host=elasticsearch
這個參數代表的是docker-compose內使用elasticsearch的網絡,確保其中的容器可以相互通信
docker network ls
在cerebro中直接配置的是 - -Dhosts.0.host=http://elasticsearch:9200
docker中配置的網絡。docker-compose內部需要通過這個網絡進行訪問
kibana 7.x的漢化 修改kibana.yml中i18n.locale: “zh-CN”
生產環境如果使用容器技術,需要考慮使用kubernetes,docker-compose主要是用在開發環境
在docker環境中通過 logstash 給 ES 注入數據
https://honghuhu.github.io/2019/6/29/
docker ps -a 查看運行的 containers
docker logs -t containerId 查看某個容器中的出錯信息
docker exec -it container_name /bin/bash
ELASTICSEARCH_HOSTS: http://172.23.0.2:9200