Starting Elasticsearch 8.0.1 in Docker

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

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

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(
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(
        at java.base/sun.nio.fs.UnixCopyFile.move(
        at java.base/sun.nio.fs.UnixFileSystemProvider.move(
        at java.base/java.nio.file.Files.move(
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(
        at org.elasticsearch.cli.Command.main(

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


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

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

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