2

I have a build and release pipeline setup in Azure Devops, to build and deploy a ASP.NET Core app. The build pipeline creates a docker image of the app and pushes it to my Azure Container Registry. The release pipeline takes that docker image and publishes and start the docker container. I have stages for DEV, TEST, and PROD defined in the release pipeline, each with a unique set of appsettings.

In the past I used to do a token replace on the appsettings.json file, dependent on the release stage. But now with Docker in the mix, I'm at a loss what to do with those environment-specific appsettings.

I don't want to have to bake in all appsettings for every environment in the docker image. I also don't want to create environment-specific docker images. Both because I believe that the build artifact should be environment agnostic, and it seems counter-intuitive to the Azure Devops release stages configuration.

Can anyone suggest best practices for this particular problem, or point me in the direction of good documentation? Thanks!

  • Any update for this issue? Have you resolved this issue? If not, would you please let me know the latest information about this issue? – Leo Liu Feb 03 '20 at 08:45
  • @DanielMann Thanks for your suggestion. The suggestion there is to have environment specific files that can be used by Docker compose. However I think that docker compose would be used in the Release pipeline and not during the Build pipeline, therefor my original question still stands. – Ajay Sewradj Feb 03 '20 at 13:00
  • @LeoLiu-MSFT No the question is still open – Ajay Sewradj Feb 03 '20 at 13:00

0 Answers0