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.
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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.