如何在Docker容器中的elasticsearch.yml中进行简单的编辑?

编程入门 行业动态 更新时间:2024-10-24 12:20:28
本文介绍了如何在Docker容器中的elasticsearch.yml中进行简单的编辑?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用 docker-compose ,如 github/davidefiocco/dockerized-elasticsearch-indexer/blob/master/docker-compose.yml 初始化容器化的Elasticsearch索引。 现在,我想为 indices.query.bool.max_clause_count 设置一个比使用 elasticsearch的默认设置更大的值.yml 配置文件(用于运行一些繁琐的查询,如 Elasticsearch -设置max_clause_count )。

到目前为止,我尝试在 docker-compose.yml 中添加以下卷:

服务: elasticsearch:数量:-./elasticsearch/config/elasticsearch.yml

(及其变体)试图指向 elasticsearch.yml 文件(我想随文件的其余部分一起提供)具有正确的 max_clause_count 设置,但无济于事。

有人可以指出我正确的方向吗?

解决方案

一种执行该(简单)修改的解决方法容器中的 elasticsearch.yml 是直接使用语法修改相关的Dockerfile

USER root RUN echo indices.query.bool.max_clause_count:1000000>> /usr/share/elasticsearch/config/elasticsearch.yml

以便附加所需的自定义值。 / p>

I am using docker-compose as in github/davidefiocco/dockerized-elasticsearch-indexer/blob/master/docker-compose.yml to initialize a containerized elasticsearch index. Now, I would like to set a larger value for indices.query.bool.max_clause_count than the default setting using a elasticsearch.yml config file (this is to run some heavy queries as in Elasticsearch - set max_clause_count).

So far I tried to add in the docker-compose.yml a volume with:

services: elasticsearch: volumes: - ./elasticsearch/config/elasticsearch.yml

(and variations thereof) trying to point to a elasticsearch.yml file (that I would like to ship with the rest of the files) with the right max_clause_count setting, but to no avail.

Can someone point me to the right direction?

解决方案

One workaround to perform that (trivial) modification to elasticsearch.yml in the container is to modify directly a relevant Dockerfile with the syntax

USER root RUN echo "indices.query.bool.max_clause_count: 1000000" >> /usr/share/elasticsearch/config/elasticsearch.yml

so to append the desired custom value.

更多推荐

如何在Docker容器中的elasticsearch.yml中进行简单的编辑?

本文发布于:2023-10-07 12:57:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1469450.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:容器   编辑   简单   如何在   elasticsearch

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!