im trying to start a elasticsearch instance for dev porpuse(the smallest possible , dont care), is inside ec2 t2.micro (in order to avoid cost running the elasticsearch service from aws)
so … i pulled the instance
docker pull docker.elastic.co/elasticsearch/elasticsearch:6.8.9
now , when i try to run the image
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.8.9
the following error apperars
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 0)
failed; error='Not enough space' (errno=12)
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 1073741824 bytes for committing reserved memory.
# An error report file with more information is saved as:
i heard in some places that you have two options
Either give more memory to your VM (is this posible for a t2.micro instance), how can achive that?
or change Elasticsearch JVM settings
/etc/elasticsearch/jvm.options and lower the values of the following parameters -Xms512m -Xmx512m but how can i do this if i the image its not available to get in
i also tried to install elasticserach via rpm but requires coreutils >= 8.4 , so another failure trying to get the instance up