# Elasticsearch in docker - data folder empty

**URL:** <https://discuss.elastic.co/t/elasticsearch-in-docker-data-folder-empty/249688>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [September 23, 2020, 5:40pm UTC](https://discuss.elastic.co/t/elasticsearch-in-docker-data-folder-empty/249688 "2020-09-23T17:40:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![javidr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javidr/32/136982_2.png) [@javidr](https://discuss.elastic.co/u/javidr)\
**Post date:** [September 23, 2020, 5:40pm UTC](https://discuss.elastic.co/t/elasticsearch-in-docker-data-folder-empty/249688/1 "2020-09-23T17:40:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [September 24, 2020, 9:32pm UTC](https://discuss.elastic.co/t/elasticsearch-in-docker-data-folder-empty/249688/2 "2020-09-24T21:32:14Z")

</div>

If you use the [official docker image](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/docker.html) at least since 5.0 we already had the same path, then it is /usr/share/elasticsearch/data. You can easily check this with :

```auto
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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 22, 2020, 9:32pm UTC](https://discuss.elastic.co/t/elasticsearch-in-docker-data-folder-empty/249688/3 "2020-10-22T21:32:25Z")

</div>

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