Hello, I want to install elasticsearch using Docker, this is in docker-compose.yml
:
version: '2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.16
container_name: elasticsearch
restart: unless-stopped
environment:
- network.host=127.0.0.1
- http.port=9200
- cluster.name=elasticsearch
- node.name="db-master"
- node.master=true
- node.data=true
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 2g
volumes:
- esdata:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- esnet
volumes:
esdata:
driver: local
networks:
esnet:
After docker-compose up
I will get:
elasticsearch is up-to-date
Attaching to elasticsearch
elasticsearch exited with code 137
There is 4GB RAM on the server.