I created a new container based on elasticsearch and it worked fine but after a few minutes it seems that the container is limited on memory usage, got out of memory message on logs.
How can i specify memory to use for a specifi container ?
System : Red Hat Enterprise Linux Server release 7.4 (Maipo)
Docker version : Docker version 17.09.0-ce
If you didn’t specify any option to limit the memory usage, then it is probably elasticsearch use out of the heap.
See elasticsearch heap size. By default, the heap size is 1GB. When you login to the container, you should be under /usr/share/elasticssearch, the jvm config file is /usr/share/elasticsearch/config/jvm.options.
You could set the env variable when starting the container, ES_JAVA_OPTS="-Xms2g -Xmx2g". See install elasticsearch with docker