H is for Harre.

harre.dev

Docker

Environment variables in an Azure Web App for Containers

Here’s a little gotcha I ran into. A .net core app I wrote needs to run inside a container and the target was a Web App for Containers on the Azure platform. No big deal so far.

The app also needs a few settings for it to do its work. We provide these via environment variables for maximum flexibility. After setting up some CI/CD stuff and deploying the app it wouldn’t start because it wasn’t loading the settings.