./esconfig is a sample name I chose to denote the config folder on your host. You need to change that to whatever name that config folder has on your local system. And that needs to be mapped to /usr/share/elasticsearch/config inside the Docker container.
Exactly what you did with your local folder esdata1 being mapped to /usr/share/elasticsearch/data inside your container
Isn't it what I did by following your suggestions?
I created a repertory esconfig at the same location where esdata1 is.
Then added the ligne "- ./esconfig:/usr/share/elasticsearch/config" to my docker-compose.yml file to map the volume as you suggested in your previous posts.
And in my /usr/share/elasticsearch/config repertory, there is a /analysis/synonyms.txt file.
However, with this set up, I cannot start my docker.
/analysis/synonyms.txt should be inside your local esconfig folder so that it gets mapped to /usr/share/elasticsearch/config/analysis/synonyms.txt inside your container. Is it the case ?
For the memory, I don't know. I didn't touch this parameter. So it must be the default value.
For the heap:
There was no jvm.options in /usr/share/elasticsearch/config/
So I put the one that is in my local ES (~/elasticsearch-6.0.1/config) in /usr/share/elasticsearch/config/ but nothing changed. The elasticsearch docker still won't run.
Otherwise, the heap parameter in the jvm.options is:
-Xms1g
-Xmx1g
ERROR: no log4j2.properties found; tried [/usr/share/elasticsearch/config] and its subdirectories
2017-12-28 14:32:12,517 main ERROR Could not register mbeans java.security.AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")
And a list of about 20 subdirectories.
This error printed itself 7 times.
Actually, the official Docker image has XPack installed and additional config files in the config folder, so we cannot override those files. Instead, we can bind mount your synonyms file directly:
Sorry, I am away from my office this week. I will try your suggestion on monday for sure.
Thank you very much for all your help and the speed with which you respond to my issues.
The docker starts well now. But when I test the analyzer, it still does not recognize the synonyms of the synonyms.txt file. The file is in the right place. And it works if I don't use the docker.
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.