Elasticsearch in docker - data folder empty

Hi

Im creating a volume for elasticsearch and it comes empty. When getting into the docker image, the path /usr/share/elasticsearch/data is empty.

however, when i run _cat/indices it displays the indices

Can you advise where that data is stored in a docker image in elasticsearch?

Thanks

If you use the official docker image at least since 5.0 we already had the same path, then it is /usr/share/elasticsearch/data. You can easily check this with :

docker run --name test123 -e "discovery.type=single-node" -d docker.elastic.co/elasticsearch/elasticsearch:7.9.2 #start container detached more
docker exec -it test123 /bin/bash # connect inside container bash
cd usr/share/elasticsearch/data
ls -l #this will show you folder nodes with recent timestamp
exit
docker rm test123 # to delete the container after the test

If this is not here for your container, then you can check using ps -ef | grep java ran inside the container

Thanks
Julien

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