Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Use new docker env var for decrypting TLS secret key file #336

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion 0.X/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ if [ -n "$VAULT_LOCAL_CONFIG" ]; then
echo "$VAULT_LOCAL_CONFIG" > "$VAULT_CONFIG_DIR/local.json"
fi

# When enabling TLS and providing a passphrase-protected secret key file,
# Pass in the VAULT_TLS_KEY_PASSPHRASE environment variable
if [ -n "$VAULT_TLS_KEY_PASSPHRASE" ]; then
echo "Using the provided passphrase to decrypt the secret key file and enable TLS."
fi

# If the user is trying to run Vault directly with some arguments, then
# pass them to Vault.
if [ "${1:0:1}" = '-' ]; then
Expand Down Expand Up @@ -101,4 +107,4 @@ if [ "$1" = 'vault' ]; then
fi
fi

exec "$@"
echo "${VAULT_TLS_KEY_PASSPHRASE}" | exec "$@"