I have an asp.net core API 2.2 implemented. I have created a docker image. I would like to override connection strings in appsettings.json file.
Is there any way to do it? I tried via environment variables when I start the container with command docker container run -e "ConnectionStrings:DefaultConnection={...here goes the connection string}"
I have also builder.AddEnvironmentVariables();
in my Startup.cs but connection string in my appsetting.json is not replaced.
I checked it inside the container, appsetting.json is there but the values are not replaced.
Any other way how to do such cases? Thx.