In general, I would start the docker instance on my local machine like docker run -t -i -e 'a=b' ...
Now, I would like to deploy and run my custom docker image which I uploaded to the Docker Container Registry before and start it like the command above - with environment variables.
Checking the Azure CLI for WebApps you can see that setting environment variables in general should be possible. But for me it seems this "environment variables" are not the environment variables which are passed to the docker command. Why? Checking the container protocol I can see how the docker container is started. There are no environment variables set.
With Azure Container, it would work like this az container create ... --environment-variables a=b
. These environment variables are passed down to the container/docker. And this is exactly what I am searching for WebApps.
Does anyone have some experience in deploying Azure Webapps with customer Docker instances started with environment variables?
printenv
the appsettings are not visible. But they do seem to be available to the container entry point. I ended up adding aecho $TEST > test.txt
to my entry point. Although they weren't available straight away. It took a couple of container restarts. – Hawthorne