'Sql Server ( Windows authentication ) in Docker Compose For Asp.net

I have Asp.net Project And I Use Docker Compose I want To Connect Sql With Windows Authentication But I Can't Can You Help Me ? appsetting :

{
  "ConnectionStrings":{
    "DefaultConnection": "Server=*******;Database=******;Trusted_Connection=True;MultipleActiveResultSets=true"
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*"
}

Docker-Compose :

version: '3.4'

services:
  connectsqltodocker:
    image: ${DOCKER_REGISTRY-}connectsqltodocker
    build:
      context: .
      dockerfile: ConnectSqlToDocker/Dockerfile
    depends_on:
       - OKKouroshCard  
  OKKouroshCard:
    image: "mcr.microsoft.com/mssql/server"
    

appsetting

solution

docker-Compose



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source