gpt4 book ai didi

docker - 非生产模式下的 Elasticsearch docker 容器以消除 vm.max_map_count=262144 要求

转载 作者:行者123 更新时间:2023-12-02 18:04:35 25 4
gpt4 key购买 nike

如何配置 elasticsearch docker 容器 (elasticsearch:7.5.0) 以使用更少的资源并在非生产模式下运行?

我想在 Jenkins 和我的桌面上运行容器,并且满足 this elastic doc 的要求用于在生产环境中运行 docker 镜像

我想弄清楚如何修改我复制到容器中的 elasticsearch.yml 以将其配置为将容器设置为资源密集度较低的模式。

有人知道怎么做吗?

最佳答案

您可以在开发模式下运行您的 docker,并按照 official ES link on single node ES cluster 创建一个单节点 ES 集群。 .如此链接中所述。

To start a single-node Elasticsearch cluster for development or testing, specify single-node discovery to bypass the bootstrap checks:



简而言之,您只需添加 -e "discovery.type=single-node"在您的 docker 命令中,这将启用开发模式,然后您不必满足生产环境的硬限制,即 它绕过引导检查 .

有关您的设置以及如何关闭它的更多信息,请访问 here

node.store.allow_mmap. This is a boolean setting indicating whether or not memory-mapping is allowed. The default is to allow it.



所以,如果 -e "discovery.type=single-node环境。不会关闭它,那么您可以在 elasticsearch.yml 中明确将其设置为 false .

关于docker - 非生产模式下的 Elasticsearch docker 容器以消除 vm.max_map_count=262144 要求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60421343/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com