Elasticsearch in docker in VM - Out of memory

Hi,
I created a vm with Alpine-linux and I am trying to deploy elasticsearch with container but I receive errors when I try do create container:

elasticsearch    | # There is insufficient memory for the Java Runtime Environment to continue.
elasticsearch    | # Native memory allocation (mmap) failed to map 2555904 bytes for committing reserved memory.
elasticsearch    | # Can not save log file, dump to screen..
elasticsearch    | #  Out of Memory Error (os_linux.cpp:2651), pid=29, tid=0x00007337c59ab700

Memory situation of my vm is:

alpine:~/elastic$ free -m
             total       used       free     shared    buffers     cached
Mem:          7483        239       7244          0         34        128
-/+ buffers/cache:         75       7407
  Swap:         4095          0       4095

I set:

environment:
  - cluster.name=docker-cluster
  - bootstrap.memory_lock=true
  - "ES_JAVA_OPTS=-Xms512m -Xmx512m"

in docker-compose.yml
What can I do?
Regards

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