Skip to content

Commit

Permalink
[DOCS] Re-add KEYSTORE_PASSWORD example to Docker install docs (#77588
Browse files Browse the repository at this point in the history
) (#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.
  • Loading branch information
jrodewig authored Sep 10, 2021
1 parent ba4420c commit cff5ed1
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions docs/reference/setup/install/docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -429,17 +429,15 @@ my.other.secure.setting
endif::[]

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

[source,yaml]
[source,sh]
----
...
volumes:
...
- type: bind
source: full_path_to/config/elasticsearch.keystore
target: /usr/share/elasticsearch/config/elasticsearch.keystore
-v full_path_to/config/elasticsearch.keystore:/usr/share/elasticsearch/config/elasticsearch.keystore
-e KEYSTORE_PASSWORD=mypassword
----

[[_c_customized_image]]
Expand Down Expand Up @@ -502,10 +500,10 @@ To resolve this error:
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
----

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

To resolve this error:

Expand Down

0 comments on commit cff5ed1

Please sign in to comment.