# When I try to mount some file to a docker elasticsearchcontainer, it always has some errors like no such file or directory

**URL:** <https://discuss.elastic.co/t/when-i-try-to-mount-some-file-to-a-docker-elasticsearchcontainer-it-always-has-some-errors-like-no-such-file-or-directory/348383>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [December 1, 2023, 3:30am UTC](https://discuss.elastic.co/t/when-i-try-to-mount-some-file-to-a-docker-elasticsearchcontainer-it-always-has-some-errors-like-no-such-file-or-directory/348383 "2023-12-01T03:30:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmc10](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nmc10/32/128350_2.png) [@nmc10](https://discuss.elastic.co/u/nmc10)\
**Post date:** [December 1, 2023, 3:30am UTC](https://discuss.elastic.co/t/when-i-try-to-mount-some-file-to-a-docker-elasticsearchcontainer-it-always-has-some-errors-like-no-such-file-or-directory/348383/1 "2023-12-01T03:30:40Z")

</div>

You can see these image to understand what I mean. I even run a test container and use ls command to check if the file existed but although it exist in the container, it still shows the error that it missed when I started the container. How can I fix this problem?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/2/328a4f542206041934c906935c280831bdc19f55.png)

---

<div class="post-metadata">

**Author:** ![nmc10](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nmc10/32/128350_2.png) [@nmc10](https://discuss.elastic.co/u/nmc10)\
**Post date:** [December 1, 2023, 3:38am UTC](https://discuss.elastic.co/t/when-i-try-to-mount-some-file-to-a-docker-elasticsearchcontainer-it-always-has-some-errors-like-no-such-file-or-directory/348383/2 "2023-12-01T03:38:08Z")

</div>

log4j2.properties still exist in the last line

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/6/666c4d1771b79982b44237c6288f61e7e67118fb.png)

---

<div class="post-metadata">

**Author:** ![nmc10](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nmc10/32/128350_2.png) [@nmc10](https://discuss.elastic.co/u/nmc10)\
**Post date:** [December 1, 2023, 3:39am UTC](https://discuss.elastic.co/t/when-i-try-to-mount-some-file-to-a-docker-elasticsearchcontainer-it-always-has-some-errors-like-no-such-file-or-directory/348383/3 "2023-12-01T03:39:14Z")

</div>

One more situation

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/f/ef1865864530f06085ebab03bb3ef6b272eb91f8.png)

---

<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:** [December 29, 2023, 3:39am UTC](https://discuss.elastic.co/t/when-i-try-to-mount-some-file-to-a-docker-elasticsearchcontainer-it-always-has-some-errors-like-no-such-file-or-directory/348383/4 "2023-12-29T03:39:33Z")

</div>

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