From 44564b46bf79bff9442f1b06b82d81f1dcda2eac Mon Sep 17 00:00:00 2001 From: Alexander Rashed Date: Mon, 25 Sep 2023 17:24:18 +0200 Subject: [PATCH] avoid setting LOCALSTACK_CLI in the container --- localstack/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/localstack/config.py b/localstack/config.py index 6003be7ad1dee..ae0f7134d2a4a 100644 --- a/localstack/config.py +++ b/localstack/config.py @@ -1271,7 +1271,10 @@ def populate_config_env_var_names(): CONFIG_ENV_VARS += [ key for key in [key.upper() for key in os.environ] - if key.startswith("LOCALSTACK_") or key.startswith("PROVIDER_OVERRIDE_") + if (key.startswith("LOCALSTACK_") or key.startswith("PROVIDER_OVERRIDE_")) + # explicitly exclude LOCALSTACK_CLI (it's prefixed with "LOCALSTACK_", + # but is only used in the CLI (should not be forwarded to the container) + and key != "LOCALSTACK_CLI" ] # create variable aliases prefixed with LOCALSTACK_ (except LOCALSTACK_HOSTNAME)