I have installed docker on arch os and I have been using docker for a while now. Recently, docker run -v "$PWD/esdata":/usr/share/elasticsearch/data -d -p 9200:9200 -p 9300:9300 -e ES_JAVA_OPTS="-Xms1g -Xmx1g" elasticsearch:5.1
no longer works and the container automatically stops in a sec. I then tried the solution given here. By adding tail -f /dev/null
to the end of my previous command. Now, the container runs but I get nothing when I go to localhost:9200
Came across the same issue with below command
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.2.4
My environment is docker on MacOS. As per 'For those using Windows or OSX ' section in this article Docker memory needs to be 4GB min. After changing the memory limit, container started without any issues.
in my case, it was a permission issue so I added permission next to the volume:
this one: //read, write and execute
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
environment:
- discovery.type=single-node
volumes:
- /home/shared-content-initiative/elasticsearch:/usr/share/elasticsearch/data //read, write and execute
- ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With