# 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:** 1\
**Showing post:** 2

<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.

---

_[View the full topic](https://discuss.elastic.co/t/is-it-possible-to-point-out-to-a-synonm-file-outside-a-docker-image/161719)._
