From 5221c548525361e4b7b95e9b7e39bd66307c13fa Mon Sep 17 00:00:00 2001 From: H3xCat <2304691+h3xcat@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:52:57 -0800 Subject: [PATCH] Fix ELASTIC_PASSWORD with KEYSTORE_PASSWORD docker usage --- distribution/docker/src/docker/bin/docker-entrypoint.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/distribution/docker/src/docker/bin/docker-entrypoint.sh b/distribution/docker/src/docker/bin/docker-entrypoint.sh index d7b41b81bb7e3..3a945b3d2cb71 100755 --- a/distribution/docker/src/docker/bin/docker-entrypoint.sh +++ b/distribution/docker/src/docker/bin/docker-entrypoint.sh @@ -50,8 +50,7 @@ if [[ -f bin/elasticsearch-users ]]; then # keystore requires password if ! (echo "$KEYSTORE_PASSWORD" \ | elasticsearch-keystore list | grep -q '^bootstrap.password$') ; then - COMMANDS="$(printf "%s\n%s" "$KEYSTORE_PASSWORD" "$ELASTIC_PASSWORD")" - (echo "$COMMANDS" | elasticsearch-keystore add -x 'bootstrap.password') + (echo "$KEYSTORE_PASSWORD" | elasticsearch-keystore add-file 'bootstrap.password' <(echo -n "$ELASTIC_PASSWORD")) fi fi fi