非生产模式下的 Elasticsearch docker 容器以消除 vm.max_map_count=262144 要求 [英] Elasticsearch docker container in non-prod mode to eliminate vm.max_map_count=262144 requirement

查看:21
本文介绍了非生产模式下的 Elasticsearch docker 容器以消除 vm.max_map_count=262144 要求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

How can I configure elasticsearch docker containers (elasticsearch:7.5.0) to use fewer resources and run in a nonproduction mode?

我想在 Jenkins 和我的桌面上运行容器,并且正在满足 这个弹性文档,用于在生产中运行 docker 镜像

I want to run containers in Jenkins and on my desktop and am hitting the requirement from this elastic doc for running docker images in production

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

I'd like to figure out how I can modify my elasticsearch.yml which I copy into the container to configure it to set the container into a less resource-intensive mode.

有人知道怎么做吗?

推荐答案

您可以按照 单节点ES集群上的官方ES链接.正如此链接中所述.

You can run your docker in development mode and create a single node ES cluster by following official ES link on single node ES cluster. As mention in this link.

启动单节点 Elasticsearch 集群进行开发或测试,指定单节点发现绕过引导检查:

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

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

In-short all you need to do is add -e "discovery.type=single-node" in your docker command, which would enable the dev mode and then you don't have to satisfy the hard limits of production environments ie it bypass bootstrap checks.

有关您的设置以及如何将其关闭的更多信息可以在 这里

More information on your settings and how to turn it off can be found here

node.store.allow_mmap.这是一个布尔设置,指示是否或不允许内存映射.默认是允许的.

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 env. 没有将其关闭,那么您可以在您的 elasticsearch.yml.

So, if -e "discovery.type=single-node env. doesn't turn it off, then you can explicitly set it false in your elasticsearch.yml.

这篇关于非生产模式下的 Elasticsearch docker 容器以消除 vm.max_map_count=262144 要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆