Is it possible to point out to a synonm file outside a docker image

I think my question is composed of two parts:

  1. Is there a way for elasticsearch (using synonyms_path parameter) to point out to an external synonym files ?

  2. If yes, how can we do that using an elasticserch installed in a docker image ? (this one is not an ES related question though)

I'm asking because I have an ES installed in a docker image and I don't want to modify it.

Thank you !

Concerning the first question, I tried:

  • Using a remote URL
  • Specifying an external (local) path e.g /home/user_name/synonyms.txt

Both of this approaches didn't work mainly for security reasons (more details here and here)

Now I'll try to use docker volume and see hos it goes.


Yes, docker volumes solved my problem, In docker-compose.yml I mounted the directory containing synonyms files (host) to /usr/share/elasticsearch/config/synonyms inside ES docker image using the shot syntax.

Hope this helps someone else.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.