I have a web app for containers running linux. Im running a docker container. It all works but I wanted to add an environment variable as follows:
docker run -e my_app_setting_var=theValue
The documentation says that app setting will be automatically added as -e environment variables here: App Settings are injected into your app as environment variables at runtime
But as you can see from my logs it doesnt get added: (some stuff stripped out)
docker run -d -p 30174:5000 --name thename -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITES_PORT=5000 -e WEBSITE_SITE_NAME=the_website_name -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_INSTANCE_ID=the_role_id -e HTTP_LOGGING_ENABLED=1 acr_where_image_is.azurecr.io/image_name:latest Dockerfile
I would expect to see an environment variable like this:
docker run -d -p 30174:5000 --name thename -e my_app_setting_var=theValue
Any ideas?
Cheers
The Azure Web App for Container will inject the environment variables that you set in the portal or through the Azure CLI. But unfortunately, you will not see your environment variables in the logs. The logs will show you a little of the variables. You can just confirm with echo the variables in the tool just like Kudu, and you can see them in the environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With