Skip to content

Commit cff5ed1

Browse files
authored
[DOCS] Re-add KEYSTORE_PASSWORD example to Docker install docs (#77588) (#77592)
PR #77155 updated the keystore instructions for Docker. However, it removed an example that included the `KEYSTORE_PASSWORD` env variable. This replaces a docker compose example with the original example from PR #51123.
1 parent ba4420c commit cff5ed1

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

docs/reference/setup/install/docker.asciidoc

+11-13
Original file line numberDiff line numberDiff line change
@@ -429,17 +429,15 @@ my.other.secure.setting
429429
endif::[]
430430

431431
If you've already created the keystore and don't need to update it, you can
432-
bind-mount the `elasticsearch.keystore` file directly. For example, you can
433-
add the following to `docker-compose.yml`:
432+
bind-mount the `elasticsearch.keystore` file directly. You can use the
433+
`KEYSTORE_PASSWORD` environment variable to provide the keystore password to the
434+
container at startup. For example, a `docker run` command might have the
435+
following options:
434436

435-
[source,yaml]
437+
[source,sh]
436438
----
437-
...
438-
volumes:
439-
...
440-
- type: bind
441-
source: full_path_to/config/elasticsearch.keystore
442-
target: /usr/share/elasticsearch/config/elasticsearch.keystore
439+
-v full_path_to/config/elasticsearch.keystore:/usr/share/elasticsearch/config/elasticsearch.keystore
440+
-e KEYSTORE_PASSWORD=mypassword
443441
----
444442

445443
[[_c_customized_image]]
@@ -502,10 +500,10 @@ To resolve this error:
502500
Exception in thread "main" java.nio.file.FileSystemException: /usr/share/elasticsearch/config/elasticsearch.keystore.tmp -> /usr/share/elasticsearch/config/elasticsearch.keystore: Device or resource busy
503501
----
504502

505-
A <<docker-keystore-bind-mount,keystore-related>> `docker run` command attempted
506-
to directly bind-mount the `elasticsearch.keystore` file. To update the
507-
keystore, the container requires access to other files in the `config`
508-
directory, such as `keystore.tmp`.
503+
A `docker run` command attempted to <<docker-keystore-bind-mount,update the
504+
keystore>> while directly bind-mounting the `elasticsearch.keystore` file. To
505+
update the keystore, the container requires access to other files in the
506+
`config` directory, such as `keystore.tmp`.
509507

510508
To resolve this error:
511509

0 commit comments

Comments
 (0)