# How to give JVM options for docker image - docker.elastic.co/elasticsearch/elasticsearch-oss:6.6.1

**URL:** <https://discuss.elastic.co/t/how-to-give-jvm-options-for-docker-image-docker-elastic-co-elasticsearch-elasticsearch-oss-6-6-1/192826>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [July 30, 2019, 5:51am UTC](https://discuss.elastic.co/t/how-to-give-jvm-options-for-docker-image-docker-elastic-co-elasticsearch-elasticsearch-oss-6-6-1/192826 "2019-07-30T05:51:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vivek\_Vardhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vivek_vardhan/32/49429_2.png) [@Vivek\_Vardhan](https://discuss.elastic.co/u/Vivek_Vardhan)\
**Post date:** [July 30, 2019, 5:51am UTC](https://discuss.elastic.co/t/how-to-give-jvm-options-for-docker-image-docker-elastic-co-elasticsearch-elasticsearch-oss-6-6-1/192826/1 "2019-07-30T05:51:05Z")

</div>

I am using the above mentioned docker image for building my elastic search cluster. After cluster build is finished, when I checked the Java process in the pod, it was taking default 1g as xms and xmx, I added in the elasticsearch.yaml config the JVM options as

`ES_JAVA_OPTS: -Xms3000m -Xmx3000m`

But, in this I am getting, no such config exists exception. What is the correct way to give the Java options in this image and where can I found the image specific documentations for elastic search?

In the java process, i can see

`-Des.cgroups.hierarchy.override=/ -Xms3000m -Xmx3000m`, this is coming. Is this overriding the heap size correctly?

---

<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:** [August 27, 2019, 5:51am UTC](https://discuss.elastic.co/t/how-to-give-jvm-options-for-docker-image-docker-elastic-co-elasticsearch-elasticsearch-oss-6-6-1/192826/2 "2019-08-27T05:51:13Z")

</div>

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