Skip to content

Commit 60d33cd

Browse files
authored
Fix ELASTIC_PASSWORD with KEYSTORE_PASSWORD docker usage
1 parent fe7818a commit 60d33cd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

distribution/docker/src/docker/bin/docker-entrypoint.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ if [[ -f bin/elasticsearch-users ]]; then
5050
# keystore requires password
5151
if ! (echo "$KEYSTORE_PASSWORD" \
5252
| elasticsearch-keystore list | grep -q '^bootstrap.password$') ; then
53-
COMMANDS="$(printf "%s\n%s" "$KEYSTORE_PASSWORD" "$ELASTIC_PASSWORD")"
54-
(echo "$COMMANDS" | elasticsearch-keystore add -x 'bootstrap.password')
53+
(echo "$KEYSTORE_PASSWORD" | elasticsearch-keystore add-file 'bootstrap.password' <(echo -n "$ELASTIC_PASSWORD"))
5554
fi
5655
fi
5756
fi

0 commit comments

Comments
 (0)