How to pass environment variables during program runtime for docker container in azure

I have my connection string inside a .env file, which I don't commit into the git repo. And I have my app up and running on Azure.

So the way my app works is, when I push my code to Github, Azure Container Registry will build the image on the committed code, and then Azure App Service is going to pull and build a container for my app.

So my question is, how do I pass that connection string to the Docker container? What I could do is put the .env file into the git repo, but I don't think I should put it up there.

Read more here:

Content Attribution

This content was originally published by Will Doan at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: