How to do a simple edit in elasticsearch.yml in a docker container?
You can mount the host's directory containing the elasticsearch.yml into the container using
services: elasticsearch: volumes: - path_to/custom_elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
One workaround to perform that (trivial) modification to elasticsearch.yml
in the container is to modify directly a relevant Dockerfile with the syntax
USER rootRUN echo "indices.query.bool.max_clause_count: 1000000" >> /usr/share/elasticsearch/config/elasticsearch.yml
so to append the desired custom value.