title: asp.net core override connection strings via ENV variables
body: <p>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.</p>
  
  <p>Is there any way to do it? I tried via environment variables when I start the container with command <code>docker container run -e "ConnectionStrings:DefaultConnection={...here goes the connection string}"</code></p>
  
  <p>I have also <code>builder.AddEnvironmentVariables();</code> in my Startup.cs but connection string in my appsetting.json is not replaced.</p>
  
  <p>I checked it inside the container, appsetting.json is there but the values are not replaced.</p>
  
  <p>Any other way how to do such cases? Thx.</p>