# Docker max virtual memory areas vm.max\_map\_count is too low,

**URL:** <https://discuss.elastic.co/t/docker-max-virtual-memory-areas-vm-max-map-count-is-too-low/221779>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [March 2, 2020, 9:49pm UTC](https://discuss.elastic.co/t/docker-max-virtual-memory-areas-vm-max-map-count-is-too-low/221779 "2020-03-02T21:49:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andres\_Guerrero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andres_guerrero/32/63556_2.png) [@Andres\_Guerrero](https://discuss.elastic.co/u/Andres_Guerrero)\
**Post date:** [March 2, 2020, 9:49pm UTC](https://discuss.elastic.co/t/docker-max-virtual-memory-areas-vm-max-map-count-is-too-low/221779/1 "2020-03-02T21:49:48Z")

</div>

Hello,

what is the correct way to add the following settings to my container

> "vm.max\_map\_count=262144"

I've added to my project the [Official dockerfile](https://github.com/elastic/dockerfiles/blob/7.6/elasticsearch/Dockerfile)

Then i added the following line on the dockerfile without success:

```
# Replace OpenJDK's built-in CA certificate keystore with the one from the OS
# vendor. The latter is superior in several ways.
# REF: https://github.com/elastic/elasticsearch-docker/issues/171
RUN ln -sf /etc/pki/ca-trust/extracted/java/cacerts /usr/share/elasticsearch/jdk/lib/security/cacerts

RUN echo "vm.max_map_count=262144" >> /etc/sysctl.conf

```

Throws me the following error:

> es01\_1 | [1]: max virtual memory areas vm.max\_map\_count [65530] is too low, increase to at least [262144]  
> es01\_1 | [2]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed\_hosts, discovery.seed\_providers, cluster.initial\_master\_nodes] must be configured  
> es01\_1 | ERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/es-docker-cluster.log

What else is missing?

---

<div class="post-metadata">

**Author:** ![IRQ](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/irq/32/45225_2.png) [@IRQ](https://discuss.elastic.co/u/IRQ)\
**Post date:** [March 29, 2020, 5:52pm UTC](https://discuss.elastic.co/t/docker-max-virtual-memory-areas-vm-max-map-count-is-too-low/221779/2 "2020-03-29T17:52:42Z")

</div>

After several hours of googling and debugging I eventually managed to turn off production mode by setting "discovery.type" to the value "single-node". I did it wiht OpenShift Web Console but it does not matter.

As far as I understand default mode for this setting has some other value so elasticsearch still performs bootstrap checks and fails. Probably the same effect would have been setting cluster.name variable to empty value but I did not try.

---

<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:** [April 26, 2020, 5:52pm UTC](https://discuss.elastic.co/t/docker-max-virtual-memory-areas-vm-max-map-count-is-too-low/221779/3 "2020-04-26T17:52:43Z")

</div>

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