# Starting Elasticsearch 8.0.1 in Docker

**URL:** <https://discuss.elastic.co/t/starting-elasticsearch-8-0-1-in-docker/298997>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [March 7, 2022, 5:22pm UTC](https://discuss.elastic.co/t/starting-elasticsearch-8-0-1-in-docker/298997 "2022-03-07T17:22:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SwampyFox](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swampyfox/32/89601_2.png) [@SwampyFox](https://discuss.elastic.co/u/SwampyFox)\
**Post date:** [March 7, 2022, 5:22pm UTC](https://discuss.elastic.co/t/starting-elasticsearch-8-0-1-in-docker/298997/1 "2022-03-07T17:22:11Z")

</div>

I am running the following docker run command

docker run --name es01 --net elastic -p 9200:9200 -v /home/cbryan/Elasticsearch.yml:/usr/share/Elasticsearch/config/Elasticsearch.yml -it [docker.elastic.co/elasticsearch/elasticsearch:8.0.1](http://docker.elastic.co/elasticsearch/elasticsearch:8.0.1)

In the Elasticsearch.yml, I have specified the cluster-name and network.host IP Address (e.g 192.168.50.109). However, I get the following error:

```auto
Exception in thread "main" java.nio.file.FileSystemException: /usr/share/elasticsearch/config/elasticsearch.yml.iZQ49kUURkq03BAtb4I-bQ.tmp -> /usr/share/elasticsearch/config/elasticsearch.yml: Device or resource busy
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
        at java.base/sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:416)
        at java.base/sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:266)
        at java.base/java.nio.file.Files.move(Files.java:1432)
        at org.elasticsearch.xpack.security.cli.AutoConfigureNode.fullyWriteFile(AutoConfigureNode.java:1136)
        at org.elasticsearch.xpack.security.cli.AutoConfigureNode.fullyWriteFile(AutoConfigureNode.java:1148)
        at org.elasticsearch.xpack.security.cli.AutoConfigureNode.execute(AutoConfigureNode.java:687)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
        at org.elasticsearch.cli.Command.main(Command.java:77)
        at org.elasticsearch.xpack.security.cli.AutoConfigureNode.main(AutoConfigureNode.java:157)

```

I am assuming that when I set the network.hosts, the generated http\_ca.crt will get generated with those values.

I am not sure why I am getting the error above?

Thank you

Chuck

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [March 30, 2022, 3:22am UTC](https://discuss.elastic.co/t/starting-elasticsearch-8-0-1-in-docker/298997/2 "2022-03-30T03:22:51Z")

</div>

Thanks for bringing this up. We were able to reproduce this and looking into it. You can track progress in [Elasticsearch fails to start in Docker, when `elasticsearch.yml` is bind mount · Issue #85463 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/issues/85463)

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [March 31, 2022, 2:51am UTC](https://discuss.elastic.co/t/starting-elasticsearch-8-0-1-in-docker/298997/3 "2022-03-31T02:51:08Z")

</div>

In the meantime, you can pass both `network.host` and `cluster.name` as parameters in your docker run command ( `-e "network.host=something" -e "cluster.name=somethingelse" ) so that you don't need to bind mount an `Elasticsearch.yml` file

---

<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:** [April 28, 2022, 2:51am UTC](https://discuss.elastic.co/t/starting-elasticsearch-8-0-1-in-docker/298997/4 "2022-04-28T02:51:10Z")

</div>

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