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

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-point-out-to-a-synonm-file-outside-a-docker-image/161719>\
**Category:** Elasticsearch\
**Created:** [December 20, 2018, 3:38pm UTC](https://discuss.elastic.co/t/is-it-possible-to-point-out-to-a-synonm-file-outside-a-docker-image/161719 "2018-12-20T15:38:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bilal](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bilal](https://discuss.elastic.co/u/Bilal)\
**Post date:** [December 20, 2018, 3:38pm UTC](https://discuss.elastic.co/t/is-it-possible-to-point-out-to-a-synonm-file-outside-a-docker-image/161719/1 "2018-12-20T15:38:21Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![Bilal](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bilal](https://discuss.elastic.co/u/Bilal)\
**Post date:** [January 2, 2019, 10:24am UTC](https://discuss.elastic.co/t/is-it-possible-to-point-out-to-a-synonm-file-outside-a-docker-image/161719/2 "2019-01-02T10:24:36Z")

</div>

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](https://discuss.elastic.co/t/external-url-for-synonms-path/97757/2) and [here](https://discuss.elastic.co/t/500-error-synonym-file-cant-be-read/62345/2))

Now I'll try to use [docker volume](https://docs.docker.com/storage/volumes/) and see hos it goes.

* * *

**Update** :

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](https://docs.docker.com/compose/compose-file/#short-syntax-3).

Hope this helps someone else.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 30, 2019, 10:24am UTC](https://discuss.elastic.co/t/is-it-possible-to-point-out-to-a-synonm-file-outside-a-docker-image/161719/3 "2019-01-30T10:24:38Z")

</div>

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